Include values of A_Const nodes in query jumbling
Michael Paquier <michael@paquier.xyz>
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
Files
| Path | Change | +/− |
|---|---|---|
| contrib/pg_stat_statements/expected/pg_stat_statements.out | modified | +15 −1 |
| contrib/pg_stat_statements/sql/pg_stat_statements.sql | modified | +8 −0 |
| src/backend/nodes/queryjumblefuncs.c | modified | +35 −0 |
| src/include/nodes/parsenodes.h | modified | +1 −1 |
Discussion
- Generating code for query jumbling through gen_node_support.pl 44 messages · 2022-12-07 → 2023-07-19