3 ms·
Neat. The release notes contain a reference to a statement I wasn't aware of - DROP OWNED BY. Usually I place a DROP TABLE IF EXISTS at the top when trying new
by tofflos 11y ago
Neat. The release notes contain a reference to a statement I wasn't aware of - DROP OWNED BY. Usually I place a DROP TABLE IF EXISTS at the top when trying new things out, but that requires a list of all tables which is somewhat tedious to type. DROP OWNED BY solves that elegantly.
- danneu 11y agoEven simpler: DROP SCHEMA public CASCADE; CREATE SCHEMA public;
- jsprogrammer 11y agoAlso, `DROP DATABASE dev_base; CREATE DATABASE dev_base;`
- danneu 11y agoThe benefit of recreating the schema is that you can do it without killing your connection.
- jsprogrammer 11y agoVery true. I drop all connections, drop the db with all the schemas and force all clients to reconnect. Should eliminate any transient issues.