Thursday, September 25, 2008

Re: [BUGS] BUG #4437: Breaking referential integrity with a trigger

"Tim Leppard" <> 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

Sent via pgsql-bugs mailing list (
To make changes to your subscription:

No comments: