aboutsummaryrefslogtreecommitdiff
path: root/src/tutorial/funcs.c
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2023-03-08 11:41:52 +0900
committerMichael Paquier <michael@paquier.xyz>2023-03-08 11:41:52 +0900
commitd69cd3a2e29c68a3fdfd4e97167f9a7c6ad29e80 (patch)
tree9765051f1d8c0eb17c87e37419262d693c0b6eb7 /src/tutorial/funcs.c
parentee56048b0ecfee67a76ba8502b91cb5d91b6b03d (diff)
downloadpostgresql-d69cd3a2e29c68a3fdfd4e97167f9a7c6ad29e80.tar.gz
postgresql-d69cd3a2e29c68a3fdfd4e97167f9a7c6ad29e80.zip
Ignore IntoClause.viewQuery in query jumbling
IntoClause.viewQuery is a copy of the parsed-but-not-rewritten SELECT clause copied to IntoClause when transforming CreateTableAsStmt for a materialized view. Including a second copy of the SELECT Query into the query jumbling was leading to an incorrect numbering of the Const node locations, as these would be counted twice instead of once. This becomes visible once the query normalization is applied to CREATE MATERIALIZED VIEW in pg_stat_statements in the shape of a query string using only odd numbers for the normalized constants, (regression tests added in pg_stat_statements as of de2aca2 would show the difference). Including the original Query from CreateTableAsStmt is enough for the query jumbling. Reviewed-by: Bertrand Drouvot Discussion: https://postgr.es/m/Y+MRdEq9W9XVa2AB@paquier.xyz
Diffstat (limited to 'src/tutorial/funcs.c')
0 files changed, 0 insertions, 0 deletions