Re: BUG #19353: Error XX000 if referencing expanded array in grouping set: variable not found in subplan target list

From: Richard Guo <guofenglinux(at)gmail(dot)com>
To: Tender Wang <tndrwang(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, marian(dot)muller(at)serli(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #19353: Error XX000 if referencing expanded array in grouping set: variable not found in subplan target list
Date: 2025-12-25 03:58:47
Message-ID: CAMbWs4-XGMC5tFK-beOr10a3fLB7+VQqmsJv6x+NKUUs3UqvQA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Wed, Dec 24, 2025 at 11:40 AM Tender Wang <tndrwang(at)gmail(dot)com> wrote:
> Richard Guo <guofenglinux(at)gmail(dot)com> 于2025年12月24日周三 10:15写道:
>> The patch also introduces a new extern function that calls the
>> workhorse with the grouping flag enabled. Additionally, it adds two
>> new fields to struct split_pathtarget_context, but that struct is
>> defined entirely within the .c file.

> It is safe if the struct is only used in a .c file. It would be better to add a note in the comment for the struct to notice.

Yeah, a struct defined in .c file should be safe to modify. My main
concern was adding a new extern function to back-branches, as it can
break forward compatibility (like an extension built on 18.2 not
working on 18.1).

After a quick discussion on Discord, I believe it is safe to proceed.
Forward compatibility issues can only happen if a new extern function
is added to core and meanwhile called by an extension, which is quite
rare.

Thus, I have pushed and back-patched this fix.

Thank you, Marian, for the report. It was a good find. The fix will
be available in 18.2, which is scheduled for release in February.

- Richard

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tender Wang 2025-12-25 04:48:08 Re: BUG #19355: Attempt to insert data unexpectedly during concurrent update
Previous Message Dean Rasheed 2025-12-24 23:11:53 Re: BUG #19355: Attempt to insert data unexpectedly during concurrent update