Re: BEFORE triggers that return NULL can circumvent referentialintegrity - Mailing list pgsql-bugs

From Jim Finnerty
Subject Re: BEFORE triggers that return NULL can circumvent referentialintegrity
Date
Msg-id 1540993207811-0.post@n3.nabble.com
Whole thread Raw
In response to Re: BEFORE triggers that return NULL can circumvent referential integrity  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-bugs
Thank you, Pavel.  The initial issue is the willingness to modify the RETURN
NULL semantics so that it causes a statement to fail if the triggering event
was a referential action, thereby preserving both Foreign Key semantics and
RETURN NULL semantics in cases other than when it breaks referential
integrity.  In my opinion, extending SQL in a way that broke referential
integrity was a mistake, but it's a mistake that can be fixed without too
much impact on existing applications.

If the community is willing to accept that RETURN NULL needs this tweak to
its semantics, we can provide an implementation and will post it to
pghackers.



-----
Jim Finnerty, AWS, Amazon Aurora PostgreSQL
--
Sent from: http://www.postgresql-archive.org/PostgreSQL-bugs-f2117394.html


pgsql-bugs by date:

Previous
From: graham labdon
Date:
Subject: Font Size
Next
From: tsuraan
Date:
Subject: Re: BUG #15467: The database subdirectory "pg_tblspc/1932420460/PG_10_201707211/16400"is missing.