Re: queryId constant squashing does not support prepared statements

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Sami Imseih <samimseih@gmail.com>
Cc: Dmitry Dolgov <9erthalion6@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-05-01T22:10:19Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Fix typo in comment

  2. Make query jumbling also squash PARAM_EXTERN params

  3. Fix squashing algorithm for query texts

  4. pg_stat_statements: Fix parameter number gaps in normalized queries

On Thu, May 01, 2025 at 03:57:16PM -0500, Sami Imseih wrote:
> I think what we should really allow the broader scope of expressions that
> are allowed via prepared statements, and this will make this implementation
> consistent between prepared vs non-prepared statements. I don't see why
> not. In fact, when we are examining the ArrayExpr, I think the only
> thing we should
> not squash is if we find a Sublink ( i.e. SELECT statement inside the array ).

Likely so.  I don't have anything else than Sublink in mind that would
be worth a special case..

> I am really leaning towards that we should revert this feature as the
> limitation we have now with parameters is a rather large one and I think
> we need to go back and address this issue.

I am wondering if this would not be the best move to do on HEAD.
Let's see where the discussion drives us.
--
Michael