From: Tom Lane <tgl@sss.pgh.pa.us>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: rasmus@mindplay.dk, "pgsql-bugs@postgresql.org" <pgsql-bugs@postgresql.org>
Subject: Re: BUG #14596: False primary/unique key constraint violations
Date: Wed, 22 Mar 2017 11:41:37 -0400
Message-ID: <963.1490197297@sss.pgh.pa.us> (raw)
In-Reply-To: <CAKFQuwbkTyp1FpqVrrOxGPSsEceBf2C4vwZtuGM=JBOcON7uQg@mail.gmail.com>
References: <20170322123053.1421.55154@wrigleys.postgresql.org>
<31317.1490193907@sss.pgh.pa.us>
<CAKFQuwbkTyp1FpqVrrOxGPSsEceBf2C4vwZtuGM=JBOcON7uQg@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> On Wed, Mar 22, 2017 at 7:45 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> ... Be aware that this can be
>> significantly slower than immediate uniqueness checking.
> Given that the default SET CONSTRAINT behavior is IMMEDIATE, and that
> triggers are defined DEFERRABLE, what harm would there be to default to the
> standard mandated behavior noted above?
The performance hit is one very large problem. Another is that we don't
support using deferrable indexes for purposes such as foreign keys,
which means that
create table x (f1 int primary key);
create table y (f1 int references x);
would fail if "primary key" defaulted to meaning "deferrable". So the
standards noncompliance would just move somewhere else.
regards, tom lane
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
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: tgl@sss.pgh.pa.us, david.g.johnston@gmail.com
Subject: Re: BUG #14596: False primary/unique key constraint violations
In-Reply-To: <963.1490197297@sss.pgh.pa.us>
References: <20170322123053.1421.55154@wrigleys.postgresql.org> <31317.1490193907@sss.pgh.pa.us> <CAKFQuwbkTyp1FpqVrrOxGPSsEceBf2C4vwZtuGM=JBOcON7uQg@mail.gmail.com> <963.1490197297@sss.pgh.pa.us>
* 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