Re: Making joins involving ctid work for the benefit of UPSERT

From: Greg Stark <stark(at)mit(dot)edu>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Peter Geoghegan <pg(at)heroku(dot)com>, Andres Freund <andres(at)2ndquadrant(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Making joins involving ctid work for the benefit of UPSERT
Date: 2014-07-23 21:51:14
Message-ID: CAM-w4HOnJuceFtBB4rFdEDxie0xqjTD9QO3S09sNedK0f=d8ew@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jul 23, 2014 at 5:58 PM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> I'd suggest something like:
>
> UPSERT table SET col = value [, ...] WHERE predicate;

I don't think this is actually good enough. Typical use cases are
things like "increment this counter or insert a new one starting at
0".

--
greg

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Grittner 2014-07-23 22:01:50 Re: Making joins involving ctid work for the benefit of UPSERT
Previous Message Fabrízio de Royes Mello 2014-07-23 21:48:23 Re: Verbose output of pg_dump not show schema name