If a Postgres table is dropped, do you also have to delete it's indexes, triggers or constraints?
I have come accross this question many times: “If I delete a Postgres table, do I also have to delete it’s indexes, triggers and constraints before or afterwards?“. The short answer is no. When a table is dropped, Postgres will also delete it’s related indexes, triggers and constraints. In the following article a docker-compose.yml file and some code snippets are provided if you want to validate this behaviour. [Read more...]