Re: INSERT ... ON CONFLICT {UPDATE | IGNORE}
Peter Geoghegan <pg@heroku.com>
From: Peter Geoghegan <pg@heroku.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Simon Riggs <simon@2ndquadrant.com>,
Pg Hackers <pgsql-hackers@postgresql.org>,
Craig Ringer <craig@2ndquadrant.com>
Date: 2014-09-25T18:43:08Z
Lists: pgsql-hackers
On Thu, Sep 25, 2014 at 7:35 AM, Robert Haas <robertmhaas@gmail.com> wrote: > On Thu, Sep 25, 2014 at 10:12 AM, Simon Riggs <simon@2ndquadrant.com> wrote: >> IMHO it is impossible to know if any of the other code is correct >> until we have a clear and stable vision of what the command is >> supposed to perform. > > +1. > >> The inner workings are less important than what the feature does. > > +1. > >> FWIW, the row available at the end of all BEFORE triggers is clearly >> the object we should be manipulating, not the original VALUES() >> clause. Otherwise this type of INSERT would behave differently from >> normal INSERTs. Which would likely violate RLS, if nothing else. > > +1. I agree with all of this. I'm glad that my opinion on how a CONFLICTING() expression interacts with BEFORE triggers is accepted, too. -- 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