Cascading deletes in PostgreSQL

前端 未结 7 770
醉梦人生
醉梦人生 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:37

    You could create the foreign key constraints as DEFERRABLE. Then you would be able to temporarily disable them while you scrub the data and re-enable them when you are done. Have a look at this question.

    0 讨论(0)
提交回复
热议问题