pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Reflect normalization of query strings for utilities in pg_stat_
Date: Wed, 08 Mar 2023 06:01:43 +0000
Message-ID: <E1pZmrv-002SdF-Fh@gemulon.postgresql.org> (raw)

Reflect normalization of query strings for utilities in pg_stat_statements

Applying normalization changes how the following query strings are
reflected in pg_stat_statements, by showing Const nodes with a
dollar-signed parameter as this is how such queries are structured
internally once parsed:
- DECLARE
- EXPLAIN
- CREATE MATERIALIZED VIEW
- CREATE TABLE AS

More normalization could be done in the future depending on the parts
where query jumbling is applied (like A_Const nodes?), the changes being
reflected in the regression tests in majority created in de2aca2.  This
just allows the basics to work for utility queries using Const nodes.

Reviewed-by: Bertrand Drouvot
Discussion: https://postgr.es/m/Y+MRdEq9W9XVa2AB@paquier.xyz

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/daa8365a900729fe2a8d427fbeff19e763e35723

Modified Files
--------------
contrib/pg_stat_statements/expected/cursors.out | 14 ++++-----
contrib/pg_stat_statements/expected/utility.out | 38 ++++++++++++-------------
contrib/pg_stat_statements/pg_stat_statements.c |  4 ++-
3 files changed, 29 insertions(+), 27 deletions(-)



Message-ID: <E1pZmrv-002SdF-Fh@gemulon.postgresql.org>
Permalink:  ../E1pZmrv-002SdF-Fh@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1pZmrv-002SdF-Fh@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: michael@paquier.xyz
  Subject: Re: pgsql: Reflect normalization of query strings for utilities in pg_stat_
  In-Reply-To: <E1pZmrv-002SdF-Fh@gemulon.postgresql.org>
  References: <E1pZmrv-002SdF-Fh@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox