From: | Michael Paquier <michael(at)paquier(dot)xyz> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Reflect normalization of query strings for utilities in pg_stat_ |
Date: | 2023-03-08 06:01:43 |
Message-ID: | E1pZmrv-002SdF-Fh@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
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(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2023-03-08 13:27:20 | pgsql: Update comment |
Previous Message | Andres Freund | 2023-03-08 05:55:41 | pgsql: Fix corruption due to vacuum_defer_cleanup_age underflowing 64bi |