Cascading deletes in PostgreSQL

前端 未结 7 830
醉梦人生
醉梦人生 2021-01-03 01:59

I have a database with a few dozen tables interlinked with foreign keys. Under normal circumstances, I want the default ON DELETE RESTRICT behavior for those co

7条回答
  •  难免孤独
    2021-01-03 02:24

    You may want to look into using schemas with PostgreSQL. I've done this in past projects to allow different groups of people or developers to have their own data. Then you can use your scripts to create multiple copies of your database for just such situations.

提交回复
热议问题