I need to create and delete tables in a test database while in development stage, but foreign keys verification bores me every time I need to erase its tables.
Is there any form to bypass this in Postgresql?
I need to create and delete tables in a test database while in development stage, but foreign keys verification bores me every time I need to erase its tables. Is there any form to bypass this in Postgresql? |
|||
I've got it. For a single table I can do:
For all tables inside a schema, for example "public", I can do:
Source: http://www.postgresql.org/docs/current/static/sql-droptable.html http://stackoverflow.com/a/13823560/937110 Or, as suggested by a_horse_with_no_name:
source: http://postgresql.org/docs/current/static/sql-drop-owned.html |
|||||||||||||||||
|
delete
rows? Or do youdrop
the tables? It's unclear to me based on your question – a_horse_with_no_name Nov 7 '15 at 19:52