pgsql: Fix targetRelation initializiation in prepsecurity - Mailing list pgsql-committers

From Stephen Frost
Subject pgsql: Fix targetRelation initializiation in prepsecurity
Date
Msg-id E1YSASu-00078Q-Px@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Fix targetRelation initializiation in prepsecurity

In 6f9bd50eabb0a4960e94c83dac8855771c9f340d, we modified
expand_security_quals() to tell expand_security_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 original commit was.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/ee4ddcb38a0abfdb8f7302bbc332a1cb92888ed1

Modified Files
--------------
src/backend/optimizer/prep/prepsecurity.c |    4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)


pgsql-committers by date:

Previous
From: Stephen Frost
Date:
Subject: pgsql: Fix targetRelation initializiation in prepsecurity
Next
From: Stephen Frost
Date:
Subject: pgsql: Fix pg_dump handling of extension config tables