mirror of
https://github.com/postgres/postgres.git
synced 2025-05-02 11:44:50 +03: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)
|
foreach(lc, querytree_list)
|
||||||
{
|
{
|
||||||
Query *query = lfirst_node(Query, lc);
|
Query *curr_query = lfirst_node(Query, lc);
|
||||||
char *str = nodeToString(query);
|
char *str = nodeToString(curr_query);
|
||||||
Query *new_query = stringToNodeWithLocations(str);
|
Query *new_query = stringToNodeWithLocations(str);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* queryId is not saved in stored rules, but we must preserve it
|
* queryId is not saved in stored rules, but we must preserve it
|
||||||
* here to avoid breaking pg_stat_statements.
|
* 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);
|
new_list = lappend(new_list, new_query);
|
||||||
pfree(str);
|
pfree(str);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user