Reflect normalization of query strings for utilities in pg_stat_statements
Michael Paquier <michael@paquier.xyz>
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
Files
| Path | Change | +/− |
|---|---|---|
| contrib/pg_stat_statements/expected/cursors.out | modified | +7 −7 |
| contrib/pg_stat_statements/expected/utility.out | modified | +19 −19 |
| contrib/pg_stat_statements/pg_stat_statements.c | modified | +3 −1 |
Discussion
- Normalization of utility queries in pg_stat_statements 15 messages · 2023-02-08 → 2023-08-17