I
I
impressive172021-08-25 22:20:38
PostgreSQL
impressive17, 2021-08-25 22:20:38

How to cascade delete in postgres?

I need to do a cascading delete. At the same time, ON DELETE CASCADE is not registered on my key.
How can I do it?
Is it possible to hang ON DELETE CASCADE and then delete what is needed in the parent table? And then, for example, remove ON DELETE CASCADE back from the key

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
vilinyh, 2021-08-25
@impressive17

FKs don't alter, you can only drop and respawn.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question