Skip to content

Commit 4574eb9

Browse files
committed
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/Y0Ya5SH0QiaO9kKG@paquier.xyz
1 parent a1176c6 commit 4574eb9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/backend/tcop/postgres.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -815,15 +815,15 @@ pg_rewrite_query(Query *query)
815815

816816
foreach(lc, querytree_list)
817817
{
818-
Query *query = lfirst_node(Query, lc);
819-
char *str = nodeToString(query);
818+
Query *curr_query = lfirst_node(Query, lc);
819+
char *str = nodeToString(curr_query);
820820
Query *new_query = stringToNodeWithLocations(str);
821821

822822
/*
823823
* queryId is not saved in stored rules, but we must preserve it
824824
* here to avoid breaking pg_stat_statements.
825825
*/
826-
new_query->queryId = query->queryId;
826+
new_query->queryId = curr_query->queryId;
827827

828828
new_list = lappend(new_list, new_query);
829829
pfree(str);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy