Re: INSERT ... ON CONFLICT DO UPDATE with _any_ constraint

From: Geoff Winkless <pgsqladmin(at)geoff(dot)dj>
To: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: INSERT ... ON CONFLICT DO UPDATE with _any_ constraint
Date: 2015-05-19 15:49:40
Message-ID: CAEzk6fdZktK52M744AotwjcuAt5isw_xFh-0hQmq20gY0brGCQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 19 May 2015 at 16:32, I wrote:

> In the event that the INSERT triggers a constraint that the UPDATE fails
> to resolve, it will still fail in exactly the same way that running the ON
> CONFLICT on a specific constraint would fail, so it's not like you gain any
> extra value from specifying the constraint, is it?
>

​I don't know why I wrote this paragraph, it's just the product of me
thinking of something else at the same time:
UPDATE obviously doesn't resolve a conflict as such.

Thinking about it more, I suppose if multiple constraints end up triggering
for the same INSERT, it would require UPDATEs of multiple rows. Is that the
issue?

Geoff

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message John Gorman 2015-05-19 16:12:36 errmsg() clobbers errno
Previous Message Geoff Winkless 2015-05-19 15:32:36 INSERT ... ON CONFLICT DO UPDATE with _any_ constraint