From: | Simon Riggs <simon(at)2ndQuadrant(dot)com> |
---|---|
To: | Geoff Winkless <pgsqladmin(at)geoff(dot)dj> |
Cc: | Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: INSERT ... ON CONFLICT DO UPDATE with _any_ constraint |
Date: | 2015-05-21 16:54:24 |
Message-ID: | CANP8+jJO-mgLwuphQNfSzEkAWNS1TAY0B8CMwG83o7P0_O0YSg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 20 May 2015 at 05:49, Geoff Winkless <pgsqladmin(at)geoff(dot)dj> wrote:
> On 19 May 2015 at 21:57, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:
>
>> It's not clear to me how a single INSERT could cause two or more UPDATEs.
>>
>
>
> CREATE TABLE mytable (
> c1 int NOT NULL,
> c2 int NOT NULL,
> PRIMARY KEY (c1),
> UNIQUE (c2)
>
> );
>
> INSERT INTO mytable (c1, c2) (10, 20);
> INSERT INTO mytable (c1, c2) (11, 21);
> INSERT INTO mytable (c1, c2) (10, 21) ON CONFLICT DO UPDATE .....
>
> Or did you mean from a coding point of view how it would be possible to
> implement?
>
I mean "how could that possibly have useful meaning?".
--
Simon Riggs http://www.2ndQuadrant.com/
<http://www.2ndquadrant.com/>
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Geoghegan | 2015-05-21 18:25:50 | Re: INSERT ... ON CONFLICT DO UPDATE with _any_ constraint |
Previous Message | Simon Riggs | 2015-05-21 16:51:54 | Re: INSERT ... ON CONFLICT DO UPDATE with _any_ constraint |