From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Include values of A_Const nodes in query jumbling
Date: Tue, 07 Feb 2023 00:05:24 +0000
Message-ID: <E1pPBUB-001x6n-1F@gemulon.postgresql.org> (raw)
Include values of A_Const nodes in query jumbling
Like the implementation for node copy, write and read, this node
requires a custom implementation so as the query jumbling is able to
consider the correct value assigned to it, depending on its type (int,
float, bool, string, bitstring).
Based on a dump of pg_stat_statements from the regression database, this
would confuse the query jumbling of the following queries:
- SET.
- COPY TO with SELECT queries.
- START TRANSACTION with different isolation levels.
- ALTER TABLE with default expressions.
- CREATE TABLE with partition bounds.
Note that there may be a long-term argument in tracking the location of
such nodes so as query strings holding such nodes could be normalized,
but this is left as a separate discussion.
Oversight in 3db72eb.
Discussion: https://postgr.es/m/Y9+HuYslMAP6yyPb@paquier.xyz
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/9ba37b2cb6a174b37fc51d0649ef73e56eae27fc
Modified Files
--------------
.../expected/pg_stat_statements.out | 16 +++++++++-
.../pg_stat_statements/sql/pg_stat_statements.sql | 8 +++++
src/backend/nodes/queryjumblefuncs.c | 35 ++++++++++++++++++++++
src/include/nodes/parsenodes.h | 2 +-
4 files changed, 59 insertions(+), 2 deletions(-)
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: Include values of A_Const nodes in query jumbling
In-Reply-To: <E1pPBUB-001x6n-1F@gemulon.postgresql.org>
References: <E1pPBUB-001x6n-1F@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