Re: pg_stat_statements and "IN" conditions - Mailing list pgsql-hackers

From Dmitry Dolgov
Subject Re: pg_stat_statements and "IN" conditions
Date
Msg-id kxufplw6bh2qmlcdpph7oeqmmeqrflhujv3z6nejos6lomfli3@bfksqoyetq3n
Whole thread Raw
In response to Re: pg_stat_statements and "IN" conditions  (Julien Rouhaud <rjuju123@gmail.com>)
Responses Re: pg_stat_statements and "IN" conditions
List pgsql-hackers
> On Fri, Feb 14, 2025 at 10:39:45PM GMT, Julien Rouhaud wrote:
> There seems to be an off-by-1 error in parameter numbering when merging them.

There are indeed three constants, but the second is not visible in the
query text. Maybe makes sense to adjust the number in this case, let me
try.

> Note that the query text as-is can still be successfully be used in an EXPLAIN
> (GENERIC_PLAN), but it might cause problem to third party tools that try to do
> something smarter about the parameters.

Since the normalized query will be a valid one now, I hope that such
cases will be rare. On top of that it always will be option to not
enable constants squashing and avoid any troubles. Or do you have some
particular scenario of what might be problematic?



pgsql-hackers by date:

Previous
From: Julien Rouhaud
Date:
Subject: Re: pg_stat_statements and "IN" conditions
Next
From: Tom Lane
Date:
Subject: Re: Parameter binding for COPY TO queries