Re: Could be improved point of UPSERT

From: Peter Geoghegan <pg(at)heroku(dot)com>
To: Gianni <nasus(dot)maximos(at)gmail(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Could be improved point of UPSERT
Date: 2015-07-14 18:52:34
Message-ID: CAM3SWZR+5xmsbQAL9F3AxCDtCmuAGOqev9a1ouaBUEyPAe6SDA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jul 14, 2015 at 11:40 AM, Gianni <nasus(dot)maximos(at)gmail(dot)com> wrote:
> Could there be a version of UPSERT where an update is tried, and if 0 records
> are modified, an insert is done?
>
> Just wondering, I haven't got am use-case for that. I don't mid gaps in
> sequences.

Perhaps, if you don't mind having a severely restricted set of
qualifications in the UPDATE, which the existing command effectively
has anyway. That would be a very odd thing.

--
Peter Geoghegan

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2015-07-14 19:07:09 Re: ctidscan as an example of custom-scan (Re: [v9.5] Custom Plan API)
Previous Message David Guimaraes 2015-07-14 18:51:20 Re: Forensic recovery deleted pgdump custom format file