]> granicus.if.org Git - postgresql/commit
Compute root->qual_security_level in a less random place.
authorTom Lane <tgl@sss.pgh.pa.us>
Sun, 31 Mar 2019 17:47:41 +0000 (13:47 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Sun, 31 Mar 2019 17:47:41 +0000 (13:47 -0400)
commit9fd4de119c609b4110eea74f00f7b9002e14aa38
tree3ad357e59afd2136ba5c8c242c869c34076a72e5
parent2aa6e331ead7f3ad080561495ad4bd3bc7cd8913
Compute root->qual_security_level in a less random place.

We can set this up once and for all in subquery_planner's initial survey
of the flattened rangetable, rather than incrementally adjusting it in
build_simple_rel.  The previous approach made it rather hard to reason
about exactly when the value would be available, and we were definitely
using it in some places before the final value was computed.

Noted while fooling around with Amit Langote's patch to delay creation
of inheritance child rels.  That didn't break this code, but it made it
even more fragile, IMO.
src/backend/optimizer/plan/planner.c
src/backend/optimizer/util/relnode.c