Re: INSERT ... ON CONFLICT {UPDATE | IGNORE}
Marti Raudsepp <marti@juffo.org>
From: Marti Raudsepp <marti@juffo.org>
To: Peter Geoghegan <pg@heroku.com>
Cc: Robert Haas <robertmhaas@gmail.com>,
Pg Hackers <pgsql-hackers@postgresql.org>,
Craig Ringer <craig@2ndquadrant.com>
Date: 2014-10-08T09:33:25Z
Lists: pgsql-hackers
On Tue, Oct 7, 2014 at 2:27 PM, Marti Raudsepp <marti@juffo.org> wrote: > but the new approach seems > surprising: changes from BEFORE INSERT get persisted in the database, > but AFTER INSERT is not fired. I am sorry, I realize now that I misunderstood the current proposed trigger behavior, I thought what Simon Riggs wrote here already happens: https://groups.google.com/forum/#!msg/django-developers/hdzkoLYVjBY/bnXyBVqx95EJ But the point still stands: firing INSERT triggers when the UPDATE path is taken is counterintuitive. If we prevent changes of upsert key columns in BEFORE triggers then we get the benefits, including more straightforward trigger behavior and avoid problems with serial columns. Regards, Marti
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