Improve EXPLAIN's ability to cope with LATERAL references in plans.
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 30 Aug 2012 16:56:50 +0000 (12:56 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 30 Aug 2012 16:56:50 +0000 (12:56 -0400)
commitd1a4db8d25ec53fd17e99168bc5efa0b16ef6fed
tree588664bf187cc3124312d55c7f836fe71533ca25
parente1a6375d8f3a11f3447bea10883a4cbe1c5d3ec9
Improve EXPLAIN's ability to cope with LATERAL references in plans.

push_child_plan/pop_child_plan didn't bother to adjust the "ancestors"
list of parent plan nodes when descending to a child plan node.  I think
this was okay when it was written, but it's not okay in the presence of
LATERAL references, since a subplan node could easily be returning a
LATERAL value back up to the same nestloop node that provides the value.
Per changed regression test results, the omission led to failure to
interpret Param nodes that have perfectly good interpretations.
src/backend/utils/adt/ruleutils.c
src/test/regress/expected/join.out