Re: INSERT ... ON CONFLICT {UPDATE | IGNORE}
Josh Berkus <josh@agliodbs.com>
From: Josh Berkus <josh@agliodbs.com>
To: Robert Haas <robertmhaas@gmail.com>, Peter Geoghegan <pg@heroku.com>
Cc: Craig Ringer <craig@2ndquadrant.com>, Anssi Kääriäinen <anssi.kaariainen@thl.fi>, Simon Riggs <simon@2ndquadrant.com>, Bruce Momjian <bruce@momjian.us>, Kevin Grittner <kgrittn@ymail.com>, Andres Freund <andres@2ndquadrant.com>, Heikki Linnakangas <hlinnakangas@vmware.com>, Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2014-12-05T18:00:21Z
Lists: pgsql-hackers
On 12/05/2014 07:59 AM, Robert Haas wrote: > I think it's probably an important distinction, for the kinds of > reasons Anssi mentions, but we should look for some method other than > a system column of indicating it. Maybe there's a magic function that > returns a Boolean which you can call, or maybe some special clause, as > with WITH ORDINALITY. I thought the point of INSERT ... ON CONFLICT update was so that you didn't have to care if it was a new row or not? If you do care, it seems like it makes more sense to do your own INSERTs and UPDATEs, as Django currently does. I wouldn't be *opposed* to having a pseudocolumn in the RETURNed stuff which let me know updated|inserted|ignored, but I also don't see it as a feature requirement for 9.5. -- Josh Berkus PostgreSQL Experts Inc. http://pgexperts.com
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