Re: UPDATE ... ON CONFLICT DO NOTHING

From: Peter Geoghegan <pg(at)bowt(dot)ie>
To: Alexander Farber <alexander(dot)farber(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: UPDATE ... ON CONFLICT DO NOTHING
Date: 2017-03-14 23:24:15
Message-ID: CAH2-Wzn=HoJc9qi2L1639U52t=pAeVfzxSfsVRLbzGWHUDbt4Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Mar 14, 2017 at 4:55 AM, Alexander Farber
<alexander(dot)farber(at)gmail(dot)com> wrote:
> I wish there would be possibility to add ON CONFLICT DO NOTHING /* and drop
> the review */ to the both UPDATE's above, but there is no such thing
> described at https://www.postgresql.org/docs/9.5/static/sql-update.html

Heikki wanted to keep the door open to a feature like this around the
time that speculative insertion (the underlying mechanism used by
UPSERT) went in. I eventually convinced him that it is drastically
more complicated than it appears. This is essentially because it's
much harder to back out of an UPDATE than it is to back out of an
INSERT. If you're really interested, search through the -hackers
archives from around April of 2015.

--
Peter Geoghegan

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Patrick B 2017-03-15 02:18:36 index on search - pg 9.2
Previous Message David G. Johnston 2017-03-14 23:20:40 Re: UPDATE ... ON CONFLICT DO NOTHING