pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jim Finnerty <jfinnert@amazon.com>
To: pgsql-bugs@postgresql.org
Subject: Re: BEFORE triggers that return NULL can circumvent referential integrity
Date: Tue, 30 Oct 2018 14:05:03 -0700 (MST)
Message-ID: <1540933503202-0.post@n3.nabble.com> (raw)
In-Reply-To: <17500.1540931906@sss.pgh.pa.us>
References: <1540931408693-0.post@n3.nabble.com>
	<17500.1540931906@sss.pgh.pa.us>

re:     There is also nonstandard behavior if BEFORE triggers modify rows or
    prevent updates during an update that is caused by a referential
    action. This can lead to constraint violations or stored data that
    does not honor the referential constraint.

That supports the position that it was already documented, I'll grant you
that.  It is clearly a bug if it causes foreign key constraints to be
violated, documented or not.  Otherwise foreign key constraints mean nothing
in PostgreSQL.

I don't think this would be particularly difficult to fix so that it causes
the statement to fail when there is a referential action, rather than
silently returning and leaving the database in an inconsistent state.

What is the argument in favor of retaining behavior that renders foreign
keys meaningless?

What is the process for deciding whether a report represents an actionable
bug that ought to be fixed by the community?

    /Jim




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




view thread (5+ messages)  latest in thread

Message-ID: <1540933503202-0.post@n3.nabble.com>
Permalink:  ../1540933503202-0.post@n3.nabble.com/
Also on:    postgresql.org/message-id/1540933503202-0.post@n3.nabble.com

 · 

reply

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: <1540933503202-0.post@n3.nabble.com>
  References: <1540931408693-0.post@n3.nabble.com> <17500.1540931906@sss.pgh.pa.us> <1540933503202-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