mirror of
https://github.com/postgres/postgres.git
synced 2025-07-12 21:01:52 +03:00
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).
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planner.c,v 1.118 2002/05/18 02:25:49 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planner.c,v 1.119 2002/05/18 18:49:41 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -246,7 +246,7 @@ subquery_planner(Query *parse, double tuple_fraction)
|
||||
*/
|
||||
if (PlannerPlanId != saved_planid || PlannerQueryLevel > 1)
|
||||
{
|
||||
(void) SS_finalize_plan(plan);
|
||||
(void) SS_finalize_plan(plan, parse->rtable);
|
||||
|
||||
/*
|
||||
* At the moment, SS_finalize_plan doesn't handle initPlans and so
|
||||
|
Reference in New Issue
Block a user