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 Email and Password
6 years ago
8 months ago