agora inbox for pgsql-committers@postgresql.org
help / color / mirror / Atom feedFrom: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix cross-leftover pollution in FOR PORTION OF insert triggers
Date: Thu, 04 Jun 2026 09:17:40 +0000
Message-ID: <E1wV4Cq-0011B2-1W@gemulon.postgresql.org> (raw)
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%40m...
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/993a7aa0e4af0922ac86d8914e0e78fc38fb0daf
Modified Files
--------------
src/backend/executor/nodeModifyTable.c | 12 +++++++++
src/test/regress/expected/for_portion_of.out | 38 ++++++++++++++++++++++++++++
src/test/regress/sql/for_portion_of.sql | 38 ++++++++++++++++++++++++++++
3 files changed, 88 insertions(+)
Message-ID: <E1wV4Cq-0011B2-1W@gemulon.postgresql.org>
Permalink: ../E1wV4Cq-0011B2-1W@gemulon.postgresql.org/
Also on: postgresql.org/message-id/E1wV4Cq-0011B2-1W@gemulon.postgresql.org
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: peter@eisentraut.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Fix cross-leftover pollution in FOR PORTION OF insert triggers
In-Reply-To: <E1wV4Cq-0011B2-1W@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox