Thread: pgsql/src backend/optimizer/plan/planner.c bac ...

pgsql/src backend/optimizer/plan/planner.c bac ...

From
tgl@postgresql.org (Tom Lane)
Date:
CVSROOT:    /cvsroot
Module name:    pgsql
Changes by:    tgl@postgresql.org    02/05/18 14:49:41

Modified files:
    src/backend/optimizer/plan: planner.c subselect.c
    src/backend/optimizer/util: clauses.c
    src/backend/parser: parse_clause.c
    src/include/optimizer: subselect.h

Log message:
    Teach query_tree_walker, query_tree_mutator, and SS_finalize_plan to
    process function RTE expressions, which they were previously missing.
    This allows outer-Var references and subselects to work correctly in
    the arguments of a function RTE.  Install check to prevent function RTEs
    from cross-referencing Vars of sibling FROM-items, which doesn't make
    any sense (if you want to join, write a JOIN or WHERE clause).