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: IMMEDIATE constraint enforcement does not comply with the SQL standard
Date: Tue, 9 Oct 2018 04:55:24 -0700 (MST)
Message-ID: <1539086124908-0.post@n3.nabble.com> (raw)
In-Reply-To: <87zhvn8ysq.fsf@news-spur.riddles.org.uk>
References: <DD7C08FE-B246-464D-B8E8-CA07F5835509@amazon.com>
	<24593.1539035385@sss.pgh.pa.us>
	<1539036309291-0.post@n3.nabble.com>
	<87zhvn8ysq.fsf@news-spur.riddles.org.uk>

ON [ DELETE | UPDATE ] [ CASCADE | RESTRICT ] pertains to inter-table
relationships.  My understanding is that the constraint trigger names have
been carefully chosen in order to get the referential actions to work
correctly; however, this patch does not change the names or the relative
firing order of constraint triggers relative to each other.

The SET NULL action is not problematic with respect to standard compliance,
but the SET DEFAULT action potentially would be.  According to the
documentation page that you referenced, though:

"... if an action specifies SET DEFAULT but the default value would not
satisfy the foreign key constraint, the operation will fail."

The patch passes all tests in installcheck serial, as well as the tests we
have added (included with the patch), so if there is a problem we don't have
test coverage for it.  Can anyone devise a test that would cause the patch
to change the behavior of a BEFORE trigger or a referential action?

thank you,

    /Jim F



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




view thread (6+ messages)  latest in thread

Message-ID: <1539086124908-0.post@n3.nabble.com>
Permalink:  ../1539086124908-0.post@n3.nabble.com/
Also on:    postgresql.org/message-id/1539086124908-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: IMMEDIATE constraint enforcement does not comply with the SQL standard
  In-Reply-To: <1539086124908-0.post@n3.nabble.com>
  References: <DD7C08FE-B246-464D-B8E8-CA07F5835509@amazon.com> <24593.1539035385@sss.pgh.pa.us> <1539036309291-0.post@n3.nabble.com> <87zhvn8ysq.fsf@news-spur.riddles.org.uk> <1539086124908-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