pgsql: Fix planner error with pulling up subquery expressions into func

2021-10-14 Thread Tom Lane
Fix planner error with pulling up subquery expressions into function RTEs. If a function-in-FROM laterally references the output of some sub-SELECT earlier in the FROM clause, and we are able to flatten that sub-SELECT into the outer query, the expression(s) copied into the function RTE missed bei

pgsql: Fix planner error with pulling up subquery expressions into func

2021-10-14 Thread Tom Lane
Fix planner error with pulling up subquery expressions into function RTEs. If a function-in-FROM laterally references the output of some sub-SELECT earlier in the FROM clause, and we are able to flatten that sub-SELECT into the outer query, the expression(s) copied into the function RTE missed bei

pgsql: Fix planner error with pulling up subquery expressions into func

2021-10-14 Thread Tom Lane
Fix planner error with pulling up subquery expressions into function RTEs. If a function-in-FROM laterally references the output of some sub-SELECT earlier in the FROM clause, and we are able to flatten that sub-SELECT into the outer query, the expression(s) copied into the function RTE missed bei