Re: INSERT ... ON CONFLICT {UPDATE | IGNORE} - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Re: INSERT ... ON CONFLICT {UPDATE | IGNORE}
Date
Msg-id CAM3SWZQdJRPe2MZS2fxtjTBe7dxoe3h6oOtYygS=Df0sDic9QA@mail.gmail.com
Whole thread Raw
In response to Re: INSERT ... ON CONFLICT {UPDATE | IGNORE}  (Andreas Karlsson <andreas@proxel.se>)
Responses Re: INSERT ... ON CONFLICT {UPDATE | IGNORE}
List pgsql-hackers
On Thu, Aug 28, 2014 at 7:29 AM, Andreas Karlsson <andreas@proxel.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



pgsql-hackers by date:

Previous
From: Josh Berkus
Date:
Subject: Re: Similar to csvlog but not really, json logs?
Next
From: Andreas Karlsson
Date:
Subject: Re: INSERT ... ON CONFLICT {UPDATE | IGNORE}