Re: INSERT ... ON CONFLICT {UPDATE | IGNORE} - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Re: INSERT ... ON CONFLICT {UPDATE | IGNORE}
Date
Msg-id CAM3SWZT+GjbWxZ=5hNwzyvzrz94=djLJLCV3LHGY-hwaoQ6Vxg@mail.gmail.com
Whole thread Raw
In response to Re: INSERT ... ON CONFLICT {UPDATE | IGNORE}  (Heikki Linnakangas <hlinnakangas@vmware.com>)
List pgsql-hackers
On Thu, Dec 18, 2014 at 7:51 AM, Heikki Linnakangas
<hlinnakangas@vmware.com> wrote:
> On 12/18/2014 05:46 PM, Kevin Grittner wrote:
>>
>> I don't think either point was ever really settled beyond Robert
>> and I preferring ON DUPLICATE versus Peter preferring ON CONFLICT.
>
>
> I also prefer ON CONFLICT, because that makes more sense when you consider
> exclusion constraints, which I'm still hoping that this would support. If
> not immediately, at least in the future.

This was why I changed the spelling to ON CONFLICT. It also doesn't
hurt that that spelling is dissimilar to MySQL's syntax, IMV, because
there are plenty of things to dislike about ON DUPLICATE KEY UPDATE,
and I think a veneer of compatibility is inappropriate - this syntax
is both considerably more flexible and considerably safer.

-- 
Peter Geoghegan



pgsql-hackers by date:

Previous
From: Gavin Flower
Date:
Subject: Re: Commitfest problems
Next
From: "Joshua D. Drake"
Date:
Subject: Re: Commitfest problems