pgsql: Fix targetRelation initializiation in prepsecurity

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix targetRelation initializiation in prepsecurity
Date: 2015-03-01 20:27:52
Message-ID: E1YSASu-00078R-Q2@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: 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
------
REL9_4_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/99ccda339acc165d0bdfba34a62fe87cbe6f4068

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

Browse pgsql-committers by date

  From Date Subject
Next Message Stephen Frost 2015-03-02 19:13:02 pgsql: Fix pg_dump handling of extension config tables
Previous Message Tom Lane 2015-03-01 19:07:11 pgsql: Use the typcache to cache constraints for domain types.