Re: BUG #4437: Breaking referential integrity with a trigger

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #4437: Breaking referential integrity with a trigger
Дата
Msg-id 8922.1222363340@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #4437: Breaking referential integrity with a trigger  ("Tim Leppard" <hbug_1@hotmail.com>)
Список pgsql-bugs
"Tim Leppard" <hbug_1@hotmail.com> writes:
> Returning NULL from a BEFORE DELETE trigger function on a referencing table
> using CASCADE allows you to break RI.

Yup, so don't do that ;-).  Actually there are any number of ways to
break an RI constraint with poorly designed triggers.  The only way
we could prevent it is to make RI updates not fire triggers, which seems
a cure worse than the disease.

            regards, tom lane

В списке pgsql-bugs по дате отправления:

Предыдущее
От: "Tim Leppard"
Дата:
Сообщение: BUG #4437: Breaking referential integrity with a trigger
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: [ADMIN] Postgres Stats after Crash Recovery