Re: [PATCH] Fix null pointer dereference in PG19

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: Paul A Jungwirth <pj(at)illuminatedcomputing(dot)com>
Cc: Aleksander Alekseev <aleksander(at)tigerdata(dot)com>, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] Fix null pointer dereference in PG19
Date: 2026-07-06 06:34:27
Message-ID: 391a2845-105b-4048-a113-835c2742fea1@eisentraut.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 02.07.26 16:29, Paul A Jungwirth wrote:
> On Thu, Jul 2, 2026 at 12:25 AM Peter Eisentraut <peter(at)eisentraut(dot)org> wrote:
>>
>>> But I don't mind holding it back if that's what people want to do.
>>> Looking more closely at INSTEAD OF triggers, I found another bug: the
>>> FOR PORTION OF qual (and TLE) were not added, so the trigger would
>>> fire on more rows than it should, and NEW.valid_at was not
>>> pre-computed. The second patch here fixes that. I'll defer to others
>>> whether we should fix the INSTEAD OF interaction now or wait 'til v20.
>>
>> It seems to me that both FOR PORTION OF and INSTEAD OF triggers are SQL
>> standard features, so this discussion should refer to what the standard
>> says, and possibly consider what other implementations do (in addition
>> to discussing what makes sense). Since that hasn't been done yet, maybe
>> prohibiting this combination for now, as proposed by Aleksander, would
>> be best.
>
> Okay, let's do that. I'll do some research to see what the standard
> says and whether any other RDBMS offers guidance.

Do we have a suitable patch for that?

The patch proposed at the top of this thread checks for the presence of
triggers at parse time, which, I think, again has the problem that the
presence of triggers could change between parse and execution time.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Shlok Kyal 2026-07-06 06:40:34 Re: [PATCH] Preserve replication origin OIDs in pg_upgrade
Previous Message Anthonin Bonnefoy 2026-07-06 06:30:06 Re: hang during shutdown