Re: INSERT ... ON CONFLICT {UPDATE | IGNORE}

From: Peter Geoghegan <pg(at)heroku(dot)com>
To: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
Cc: Kevin Grittner <kgrittn(at)ymail(dot)com>, Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Josh Berkus <josh(at)agliodbs(dot)com>, Craig Ringer <craig(at)2ndquadrant(dot)com>, Anssi Kääriäinen <anssi(dot)kaariainen(at)thl(dot)fi>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, Andres Freund <andres(at)2ndquadrant(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: INSERT ... ON CONFLICT {UPDATE | IGNORE}
Date: 2014-12-18 19:12:42
Message-ID: CAM3SWZT+GjbWxZ=5hNwzyvzrz94=djLJLCV3LHGY-hwaoQ6Vxg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Dec 18, 2014 at 7:51 AM, Heikki Linnakangas
<hlinnakangas(at)vmware(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Joshua D. Drake 2014-12-18 19:24:18 Re: Commitfest problems
Previous Message Gavin Flower 2014-12-18 19:03:02 Re: Commitfest problems