Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitee4ddcb

Browse files
committed
Fix targetRelation initializiation in prepsecurity
In6f9bd50, we modifiedexpand_security_quals() to tell expand_security_qual() about when thecurrent RTE was the targetRelation. Unfortunately, that commitinitialized the targetRelation variable used outside of the loop overthe RTEs instead of at the start of it.This patch moves the variable and the initialization of it into theloop, where it should have been to begin with.Pointed out by Dean Rasheed.Back-patch to 9.4 as the original commit was.
1 parent8abb3cd commitee4ddcb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎src/backend/optimizer/prep/prepsecurity.c

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

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

7979
rt_index++;
8080

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp