Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gHqjG-0003SH-9H for pgsql-bugs@arkaria.postgresql.org; Wed, 31 Oct 2018 13:40:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gHqjE-0003lT-LH for pgsql-bugs@arkaria.postgresql.org; Wed, 31 Oct 2018 13:40:12 +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 1gHqjE-0003lJ-Ek for pgsql-bugs@lists.postgresql.org; Wed, 31 Oct 2018 13:40:12 +0000 Received: from n3.nabble.com ([162.255.23.22]) by magus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gHqjB-0001MY-GC for pgsql-bugs@postgresql.org; Wed, 31 Oct 2018 13:40:11 +0000 Received: from n3.nabble.com (localhost [127.0.0.1]) by n3.nabble.com (Postfix) with ESMTP id CF08E1004551F for ; Wed, 31 Oct 2018 06:40:07 -0700 (MST) Date: Wed, 31 Oct 2018 06:40:07 -0700 (MST) From: Jim Finnerty To: pgsql-bugs@postgresql.org Message-ID: <1540993207811-0.post@n3.nabble.com> In-Reply-To: References: <1540931408693-0.post@n3.nabble.com> <17500.1540931906@sss.pgh.pa.us> <1540933503202-0.post@n3.nabble.com> Subject: Re: BEFORE triggers that return NULL can circumvent referential integrity 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 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