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: Mon, 8 Oct 2018 15:05:09 -0700 (MST)
Message-ID: <1539036309291-0.post@n3.nabble.com> (raw)
In-Reply-To: <24593.1539035385@sss.pgh.pa.us>
References: <DD7C08FE-B246-464D-B8E8-CA07F5835509@amazon.com>
	<24593.1539035385@sss.pgh.pa.us>

We do want standard-compliant behavior, and standard-compliance a strength of
PostgreSQL, and as mentioned we already do have a way (DEFERRABLE INITIALLY
DEFERRED) if this is the user's intent.

The consequences of non-compliance is much more insidious than it at first
appears.  At stake here is whether PostgreSQL supports non-deferrable
constraints at all.  The purpose of having non-deferrable IMMEDIATE
constraints in the standard is to make query optimizations possible.  

Also, as far as I can tell, we do not document the specific name that we
generate for constraint triggers; therefore, any application that depends on
undocumented naming conventions is skating on precariously thin ice, in
addition to writing non-portable code.

The equivalent logic was implemented on Oracle and MySQL.  Both of those
systems implement IMMEDIATE mode constraints consistently with the standard,
and produce a different result than PostgreSQL.

best regards,

    /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: <1539036309291-0.post@n3.nabble.com>
Permalink:  ../1539036309291-0.post@n3.nabble.com/
Also on:    postgresql.org/message-id/1539036309291-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: <1539036309291-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>

* 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