• Tom Lane's avatar
    Another round of planner fixes for LATERAL. · 084a29c9
    Tom Lane authored
    Formerly, subquery pullup had no need to examine other entries in the range
    table, since they could not contain any references to the subquery being
    pulled up.  That's no longer true with LATERAL, so now we need to be able
    to visit rangetable subexpressions to replace Vars referencing the
    pulled-up subquery.  Also, this means that extract_lateral_references must
    be unsurprised at encountering lateral PlaceHolderVars, since such might be
    created when pulling up a subquery that's underneath an outer join with
    respect to the lateral reference.
    084a29c9
var.c 21.7 KB