问题
I happened to do some moderating stuff with large database but I am not so experienced in it so i guess the smart thing is to create similar database on my localhost to not mess up with original one.
And here is my question, is it possible to generete SQL
script which will create exact table as i want?
I mean on MySQL GUI tool there is option like this, reverse engineering
which generate SQL
script which will create exact database as I used function on, is it possible in PostgreSQL in shell level?
回答1:
pg_dump --schema-only db1 > db-schema.sql
来源:https://stackoverflow.com/questions/14642476/postgresql-database-reverse-engineering-from-shell-level