Re: [BUGS] ON CONFLICT with constraint name doesn't work - Mailing list pgsql-bugs

From Peter Geoghegan
Subject Re: [BUGS] ON CONFLICT with constraint name doesn't work
Date
Msg-id CAH2-Wzn-uXcLgC5uFbqe2rUfmJWP9AxKnMKAEgqU26hbURxk5A@mail.gmail.com
Whole thread Raw
In response to Re: [BUGS] ON CONFLICT with constraint name doesn't work  (Heikki Linnakangas <hlinnaka@iki.fi>)
Responses Re: [BUGS] ON CONFLICT with constraint name doesn't work  (Andres Freund <andres@anarazel.de>)
List pgsql-bugs
On Thu, Mar 16, 2017 at 12:42 PM, Heikki Linnakangas <hlinnaka@iki.fi> wrote:
> We debated this for a long time when the ON CONFLICT feature was being
> developed. In the end, we settled on this behavior, on the grounds that a
> constraint is a logical concept, while an index is a physical implementation
> detail. Note that the SQL standard also doesn't say anything about indexes,
> but constraints are in the standard.

Right. Besides, you really are only supposed to use the ON CONSTRAINT
syntax when inference won't work, as an escape hatch. This doesn't
look like an example of where inference won't work. That's limited to
ON CONFLICT DO NOTHING with exclusion constraints, which is fairly
limited.


-- 
Peter Geoghegan


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

pgsql-bugs by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: [BUGS] ON CONFLICT with constraint name doesn't work
Next
From: Andres Freund
Date:
Subject: Re: [BUGS] ON CONFLICT with constraint name doesn't work