summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Paquier2022-10-12 04:42:30 +0000
committerMichael Paquier2022-10-12 04:42:30 +0000
commit4574eb9d38c69f4c90b5468f740ff22519752066 (patch)
treeab53a4ce74678120fc3b19ca53abb221b666b644 /src
parenta1176c67c42cf687675be762ebb6075e092d3d0a (diff)
Fix shadow variable in postgres.c
-Wshadow=compatible-local is added by default since 0fe954c, and this warning was detected under -DWRITE_READ_PARSE_PLAN_TREES. Reviewed-by: David Rowley Discussion: https://postgr.es/m/[email protected]
Diffstat (limited to 'src')
-rw-r--r--src/backend/tcop/postgres.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c
index 5352d5f4c6b..27dee29f420 100644
--- a/src/backend/tcop/postgres.c
+++ b/src/backend/tcop/postgres.c
@@ -815,15 +815,15 @@ pg_rewrite_query(Query *query)
foreach(lc, querytree_list)
{
- Query *query = lfirst_node(Query, lc);
- char *str = nodeToString(query);
+ Query *curr_query = lfirst_node(Query, lc);
+ char *str = nodeToString(curr_query);
Query *new_query = stringToNodeWithLocations(str);
/*
* queryId is not saved in stored rules, but we must preserve it
* here to avoid breaking pg_stat_statements.
*/
- new_query->queryId = query->queryId;
+ new_query->queryId = curr_query->queryId;
new_list = lappend(new_list, new_query);
pfree(str);