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

From: Kevin Grittner <kgrittn(at)ymail(dot)com>
To: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, Peter Geoghegan <pg(at)heroku(dot)com>
Cc: 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 16:04:48
Message-ID: 1072433720.502125.1418918688471.JavaMail.yahoo@jws100151.mail.ne1.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.

If you think this can be made to work without a UNIQUE btree index,
that is a persuasive point in favor of ON CONFLICT. I had missed
(or forgotten) that we thought this could work without a UNIQUE
btree index as the basis of detecting when to resort to an UPDATE.

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Christoph Berg 2014-12-18 17:13:00 Re: Minor binary-search int overflow in timezone code
Previous Message Amit Kapila 2014-12-18 16:03:34 Re: Parallel Seq Scan