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

From: Peter Geoghegan <pg(at)heroku(dot)com>
To: Andreas Karlsson <andreas(at)proxel(dot)se>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Craig Ringer <craig(at)2ndquadrant(dot)com>
Subject: Re: INSERT ... ON CONFLICT {UPDATE | IGNORE}
Date: 2014-08-28 19:05:05
Message-ID: CAM3SWZQdJRPe2MZS2fxtjTBe7dxoe3h6oOtYygS=Df0sDic9QA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Aug 28, 2014 at 7:29 AM, Andreas Karlsson <andreas(at)proxel(dot)se> wrote:
> Personally I would find it surprising if RETURNING did not also return the
> updated tuples. In many use cases for upsert the user does not care if the
> row was new or not.

I'm not attached to that particular behavior, but it does seem kind of
similar to the behavior of BEFORE triggers, where a NULL return value
("do nothing") will also cause RETURNING to not project the tuple.

--
Peter Geoghegan

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andreas Karlsson 2014-08-28 19:13:01 Re: INSERT ... ON CONFLICT {UPDATE | IGNORE}
Previous Message Josh Berkus 2014-08-28 18:40:52 Re: Similar to csvlog but not really, json logs?