Re: INSERT ... ON CONFLICT {UPDATE | IGNORE}
Peter Geoghegan <pg@heroku.com>
From: Peter Geoghegan <pg@heroku.com>
To: Andreas Karlsson <andreas@proxel.se>
Cc: Pg Hackers <pgsql-hackers@postgresql.org>,
Craig Ringer <craig@2ndquadrant.com>
Date: 2014-08-28T19:05:05Z
Lists: 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
Commits
-
Change the way we mark tuples as frozen.
- 37484ad2aace 9.4.0 cited
-
Add documentation for data-modifying statements in WITH clauses.
- 0ef0b3020402 9.1.0 cited