mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-01-18 18:44:06 +08:00
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
This commit is contained in:
parent
a1176c67c4
commit
4574eb9d38
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user