PostgreSQL database reverse engineering from shell level

拈花ヽ惹草 提交于 2021-02-05 10:40:20

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!