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>, Aleksander Alekseev <aleksander(at)tigerdata(dot)com>
Cc: PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] Fix null pointer dereference in PG19
Date: 2026-07-02 07:25:33
Message-ID: 4984118e-0dc5-49a9-b279-fd0b707be8e0@eisentraut.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 29.06.26 09:38, Paul A Jungwirth wrote:
>> IMO it's a little bit late in the PG19 cycle for making this work.
>> This is an implementation of a new feature which is not present at the
>> moment which to my knowledge we don't do after the feature freeze. Our
>> goal is to fix the crash and leave the rest for the PG20 cycle.
>> Clearly the feature needs more discussion and thorough testing.
> I don't really think this is a new feature. It is a fix to make FOR
> PORTION OF not execute when it shouldn't. The change here is quite
> simple.
>
> 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.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message John Naylor 2026-07-02 07:27:25 Re: [PATCH] Refactor *_abbrev_convert() functions
Previous Message Kyotaro Horiguchi 2026-07-02 07:04:03 Re: proposal - queryid can be used as filter for auto_explain