diff --git a/src/backend/optimizer/prep/prepsecurity.c b/src/backend/optimizer/prep/prepsecurity.c index 08309538ff..b382f13504 100644 --- a/src/backend/optimizer/prep/prepsecurity.c +++ b/src/backend/optimizer/prep/prepsecurity.c @@ -63,7 +63,6 @@ expand_security_quals(PlannerInfo *root, List *tlist) Query *parse = root->parse; int rt_index; ListCell *cell; - bool targetRelation = false; /* * Process each RTE in the rtable list. @@ -74,7 +73,8 @@ expand_security_quals(PlannerInfo *root, List *tlist) rt_index = 0; foreach(cell, parse->rtable) { - RangeTblEntry *rte = (RangeTblEntry *) lfirst(cell); + bool targetRelation = false; + RangeTblEntry *rte = (RangeTblEntry *) lfirst(cell); rt_index++;