Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g9qbw-00029v-VN for pgsql-bugs@arkaria.postgresql.org; Tue, 09 Oct 2018 11:55:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1g9qbu-0006vX-5P for pgsql-bugs@arkaria.postgresql.org; Tue, 09 Oct 2018 11:55:34 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g9qbt-0006v1-VS for pgsql-bugs@lists.postgresql.org; Tue, 09 Oct 2018 11:55:34 +0000 Received: from n3.nabble.com ([162.255.23.22]) by magus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1g9qbm-0005gB-RS for pgsql-bugs@postgresql.org; Tue, 09 Oct 2018 11:55:33 +0000 Received: from n3.nabble.com (localhost [127.0.0.1]) by n3.nabble.com (Postfix) with ESMTP id DE625F9EAAC9 for ; Tue, 9 Oct 2018 04:55:24 -0700 (MST) Date: Tue, 9 Oct 2018 04:55:24 -0700 (MST) From: Jim Finnerty To: pgsql-bugs@postgresql.org Message-ID: <1539086124908-0.post@n3.nabble.com> In-Reply-To: <87zhvn8ysq.fsf@news-spur.riddles.org.uk> References: <24593.1539035385@sss.pgh.pa.us> <1539036309291-0.post@n3.nabble.com> <87zhvn8ysq.fsf@news-spur.riddles.org.uk> Subject: Re: IMMEDIATE constraint enforcement does not comply with the SQL standard MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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