From: Jim Finnerty <jfinnert@amazon.com>
To: pgsql-bugs@postgresql.org
Subject: Re: BEFORE triggers that return NULL can circumvent referential integrity
Date: Wed, 31 Oct 2018 06:40:07 -0700 (MST)
Message-ID: <1540993207811-0.post@n3.nabble.com> (raw)
In-Reply-To: <CAFj8pRC9oVLgtjOLPCxcsH0kpb8xKMdhC9pG3ZqQMXwZq4o-=w@mail.gmail.com>
References: <1540931408693-0.post@n3.nabble.com>
<17500.1540931906@sss.pgh.pa.us>
<1540933503202-0.post@n3.nabble.com>
<CAFj8pRC9oVLgtjOLPCxcsH0kpb8xKMdhC9pG3ZqQMXwZq4o-=w@mail.gmail.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: jfinnert@amazon.com
Subject: Re: BEFORE triggers that return NULL can circumvent referential integrity
In-Reply-To: <1540993207811-0.post@n3.nabble.com>
References: <1540931408693-0.post@n3.nabble.com> <17500.1540931906@sss.pgh.pa.us> <1540933503202-0.post@n3.nabble.com> <CAFj8pRC9oVLgtjOLPCxcsH0kpb8xKMdhC9pG3ZqQMXwZq4o-=w@mail.gmail.com> <1540993207811-0.post@n3.nabble.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox