Re: Inconsistent trigger behavior between two temporal leftovers - Mailing list pgsql-hackers

From Paul A Jungwirth
Subject Re: Inconsistent trigger behavior between two temporal leftovers
Date
Msg-id CA+renyVFRiVSc80y1WK558RMbXOxUuQjFNR4RqH38SbMhZfAXQ@mail.gmail.com
Whole thread
In response to Re: Inconsistent trigger behavior between two temporal leftovers  (Sergei Patiakin <sergei.patiakin@enterprisedb.com>)
List pgsql-hackers
On Wed, Apr 8, 2026 at 5:50 AM Sergei Patiakin
<sergei.patiakin@enterprisedb.com> wrote:
>
> Attaching a patch that makes the behavior more consistent.

Thank you for the bug report!

I agree this seems surprising. The asymmetry doesn't bother me per se,
but each insert should have its own copy of the original row. It
doesn't make sense for a trigger firing on one leftover to affect the
other.

I wrote a fix before I saw yours, but they are nearly the same. I
tried to share more code between the first & subsequent passes, but
it's hard to do with the mapping case. So the fix you have here looks
great to me.

Yours,

--
Paul              ~{:-)
pj@illuminatedcomputing.com



pgsql-hackers by date:

Previous
From: Peter Smith
Date:
Subject: Re: First draft of PG 19 release notes
Next
From: Paul A Jungwirth
Date:
Subject: Re: SQL:2011 Application Time Update & Delete