From: | Peter Geoghegan <pg(at)bowt(dot)ie> |
---|---|
To: | Heikki Linnakangas <hlinnaka(at)iki(dot)fi> |
Cc: | Nikolay Samokhvalov <samokhvalov(at)gmail(dot)com>, PostgreSQL mailing lists <pgsql-bugs(at)postgresql(dot)org> |
Subject: | Re: ON CONFLICT with constraint name doesn't work |
Date: | 2017-03-16 19:44:23 |
Message-ID: | CAH2-Wzn-uXcLgC5uFbqe2rUfmJWP9AxKnMKAEgqU26hbURxk5A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-hackers |
On Thu, Mar 16, 2017 at 12:42 PM, Heikki Linnakangas <hlinnaka(at)iki(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2017-03-16 19:49:08 | Re: ON CONFLICT with constraint name doesn't work |
Previous Message | Heikki Linnakangas | 2017-03-16 19:42:04 | Re: ON CONFLICT with constraint name doesn't work |
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2017-03-16 19:49:08 | Re: ON CONFLICT with constraint name doesn't work |
Previous Message | Heikki Linnakangas | 2017-03-16 19:42:04 | Re: ON CONFLICT with constraint name doesn't work |