Re: [[BUG] pg_stat_statements crashes with var and non-var expressions in IN clause - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: [[BUG] pg_stat_statements crashes with var and non-var expressions in IN clause
Date
Msg-id aW3n9ocMo_SH0TQJ@paquier.xyz
Whole thread Raw
In response to Re: [[BUG] pg_stat_statements crashes with var and non-var expressions in IN clause  (Sami Imseih <samimseih@gmail.com>)
Responses Re: [[BUG] pg_stat_statements crashes with var and non-var expressions in IN clause
List pgsql-hackers
On Thu, Jan 15, 2026 at 02:53:20PM -0600, Sami Imseih wrote:
>> As far as I recall it was an
>> intentional design decision, and to adjust newa->list_end in such
>> scenarios we need to solve the original problem of finding an end
>> location of any arbitrary expression,
>
> I'm not sure I follow. How would we adjust newa->list_end?

I may be missing something, of course, but Dmitry's message reads as
follows to me:
"It was a design choice to track the start and end locations because
we needed that for arrays, and resetting the locations if we have Vars
in the list like you are suggesting is OK by me."

I am going to re-read a bit more the area and think about a couple of
patterns to test, but I think that your suggested solution should be
OK to disable the list squashing as you are suggesting in this case:
there is nothing we can really do, and IMO that would still be OK for
most users because squashing has been designed for non-Var lists as
far as I know.  This is a rare pattern for long lists in IN arrays, as
well.  I'll sleep on it for now.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Soumya S Murali
Date:
Subject: Re: 001_password.pl fails with --without-readline
Next
From: Chao Li
Date:
Subject: Re: docs: clarify ALTER TABLE behavior on partitioned tables