In a similar vein to this question, how would I do a schema-only dump in PostgreSQL?
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