]> granicus.if.org Git - postgresql/commit
Fix targetRelation initializiation in prepsecurity
authorStephen Frost <sfrost@snowman.net>
Sun, 1 Mar 2015 20:26:55 +0000 (15:26 -0500)
committerStephen Frost <sfrost@snowman.net>
Sun, 1 Mar 2015 20:27:26 +0000 (15:27 -0500)
commitee4ddcb38a0abfdb8f7302bbc332a1cb92888ed1
treeb4133b9f90289878fc861635909a233b679b8841
parent8abb3cda0ddc00a0ab98977a1633a95b97068d4e
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.
src/backend/optimizer/prep/prepsecurity.c