Grzzzzzzzzzzzzz
Grzzzzzzzzzzzzz

Reputation: 1341

PostgreSQL database reverse engineering from shell level

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?

Upvotes: 1

Views: 490

Answers (1)

Richard Huxton
Richard Huxton

Reputation: 22972

pg_dump --schema-only db1 > db-schema.sql

Upvotes: 3

Related Questions