In a similar vein to this question, how would I do a schema-only dump in PostgreSQL?
Sign up for our newsletter and get our top new questions delivered to your inbox (see an example).
If you only want the create tables, then you can do pg_dump -s databasename | awk 'RS="";/CREATE TABLE[^;]*;/'
pg_dump -s databasename | awk 'RS="";/CREATE TABLE[^;]*;/'
Sign up using Google
Sign up using Facebook
Sign up using Stack Exchange
6 years ago
3 months ago