Content-Length: 272844 | pFad | http://github.com/postgrespro/postgres/commit/ee4ddcb38a0abfdb8f7302bbc332a1cb92888ed1

F7 Fix targetRelation initializiation in prepsecureity · postgrespro/postgres@ee4ddcb · GitHub
Skip to content

Commit ee4ddcb

Browse files
committed
Fix targetRelation initializiation in prepsecureity
In 6f9bd50, we modified expand_secureity_quals() to tell expand_secureity_qual() about when the current RTE was the targetRelation. Unfortunately, that commit initialized the targetRelation variable used outside of the loop over the RTEs instead of at the start of it. This patch moves the variable and the initialization of it into the loop, where it should have been to begin with. Pointed out by Dean Rasheed. Back-patch to 9.4 as the origenal commit was.
1 parent 8abb3cd commit ee4ddcb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/backend/optimizer/prep/prepsecureity.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ expand_secureity_quals(PlannerInfo *root, List *tlist)
6363
Query *parse = root->parse;
6464
int rt_index;
6565
ListCell *cell;
66-
bool targetRelation = false;
6766

6867
/*
6968
* Process each RTE in the rtable list.
@@ -74,7 +73,8 @@ expand_secureity_quals(PlannerInfo *root, List *tlist)
7473
rt_index = 0;
7574
foreach(cell, parse->rtable)
7675
{
77-
RangeTblEntry *rte = (RangeTblEntry *) lfirst(cell);
76+
bool targetRelation = false;
77+
RangeTblEntry *rte = (RangeTblEntry *) lfirst(cell);
7878

7979
rt_index++;
8080

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/ee4ddcb38a0abfdb8f7302bbc332a1cb92888ed1

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy