• Tom Lane's avatar
    Fix recursion into previously planned sub-query in examine_simple_variable. · 79edb2b1
    Tom Lane authored
    This code was looking at the sub-Query tree as seen in the parent query's
    RangeTblEntry; but that's the pristine parser output, and what we need to
    look at is the tree as it stands at the completion of planning.  Otherwise
    we might pick up a Var that references a subquery that got flattened and
    hence has no RelOptInfo in the subroot.  Per report from Peter Geoghegan.
    79edb2b1
selfuncs.c 196 KB