Fix cross-leftover pollution in FOR PORTION OF insert triggers
Peter Eisentraut <peter@eisentraut.org>
Author:
Peter Eisentraut <peter@eisentraut.org>
Date: 2026-06-04T09:13:16Z
Releases:
19 (unreleased)
Fix cross-leftover pollution in FOR PORTION OF insert triggers When we insert temporal leftovers after an UPDATE FOR PORTION OF, we must make a new copy of the tuple before each insert. Otherwise, if an insert trigger assigns to attributes of NEW, the second leftover sees those changes. Author: Sergei Patiakin <sergei.patiakin@enterprisedb.com> Reviewed-by: Paul A Jungwirth <pj@illuminatedcomputing.com> Discussion: https://www.postgresql.org/message-id/flat/CANE55rCqcse_pwXBMWhbj3_7XROb8Dks6%3DOLFmKy3bO3zDsCsg%40mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/executor/nodeModifyTable.c | modified | +12 −0 |
| src/test/regress/expected/for_portion_of.out | modified | +38 −0 |
| src/test/regress/sql/for_portion_of.sql | modified | +38 −0 |
Discussion
- Inconsistent trigger behavior between two temporal leftovers 9 messages · 2026-04-07 → 2026-06-04