aboutsummaryrefslogtreecommitdiff
path: root/contrib/postgres_fdw/postgres_fdw.c
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2024-07-19 10:21:24 +0900
committerMichael Paquier <michael@paquier.xyz>2024-07-19 10:21:24 +0900
commit9cd365f28f31dc8ea9d8c10ec7abd658aa29fcf5 (patch)
tree9a23cac2348881e8f3d41b4f45e591764724e6da /contrib/postgres_fdw/postgres_fdw.c
parent071ed76a06cfc42107bb3126cb6075c962879569 (diff)
downloadpostgresql-9cd365f28f31dc8ea9d8c10ec7abd658aa29fcf5.tar.gz
postgresql-9cd365f28f31dc8ea9d8c10ec7abd658aa29fcf5.zip
Propagate query IDs of utility statements in functions
For utility statements defined within a function, the query tree is copied to a PlannedStmt as utility commands do not require planning. However, the query ID was missing from the information passed down. This leads to plugins relying on the query ID like pg_stat_statements to not be able to track utility statements within function calls. Tests are added to check this behavior, depending on pg_stat_statements.track. This is an old bug. Now, query IDs for utilities are compiled using their parsed trees rather than the query string since v16 (3db72ebcbe20), leading to less bloat with utilities, so backpatch down only to this version. Author: Anthonin Bonnefoy Discussion: https://postgr.es/m/CAO6_XqrGp-uwBqi3vBPLuRULKkddjC7R5QZCgsFren=8E+m2Sg@mail.gmail.com Backpatch-through: 16
Diffstat (limited to 'contrib/postgres_fdw/postgres_fdw.c')
0 files changed, 0 insertions, 0 deletions