Re: IMMEDIATE constraint enforcement does not comply with the SQLstandard - Mailing list pgsql-bugs

From Jim Finnerty
Subject Re: IMMEDIATE constraint enforcement does not comply with the SQLstandard
Date
Msg-id 1539086124908-0.post@n3.nabble.com
Whole thread Raw
In response to Re: IMMEDIATE constraint enforcement does not comply with the SQL standard  (Andrew Gierth <andrew@tao11.riddles.org.uk>)
Responses Re: IMMEDIATE constraint enforcement does not comply with the SQLstandard
List pgsql-bugs
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


pgsql-bugs by date:

Previous
From: Andrew Gierth
Date:
Subject: Re: IMMEDIATE constraint enforcement does not comply with the SQL standard
Next
From: Jim Finnerty
Date:
Subject: Re: IMMEDIATE constraint enforcement does not comply with the SQLstandard