Skip to content

Commit 72c296d

Browse files
committed
Remove init_query_planner(), merged into planner().
1 parent e918215 commit 72c296d

File tree

1 file changed

+16
-31
lines changed

1 file changed

+16
-31
lines changed

src/backend/optimizer/plan/planner.c

Lines changed: 16 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planner.c,v 1.12 1997/12/18 12:54:11 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planner.c,v 1.13 1997/12/18 19:41:44 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -47,7 +47,6 @@
4747
#include "executor/executor.h"
4848

4949
static Plan *make_sortplan(List *tlist, List *sortcls, Plan *plannode);
50-
static Plan *init_query_planner(Query *parse);
5150

5251
/*****************************************************************************
5352
*
@@ -77,6 +76,8 @@ planner(Query *parse)
7776

7877
Plan *result_plan = (Plan *) NULL;
7978

79+
List *preprocessed_tlist = NIL;
80+
List *primary_qual;
8081
int rt_index;
8182

8283
/*
@@ -93,8 +94,20 @@ planner(Query *parse)
9394
if (special_plans)
9495
result_plan = special_plans;
9596
else
96-
result_plan = init_query_planner(parse); /* regular plans */
97+
{
98+
preprocessed_tlist = preprocess_targetlist(tlist,
99+
parse->commandType,
100+
parse->resultRelation,
101+
parse->rtable);
102+
103+
primary_qual = cnfify((Expr *) parse->qual, true);
97104

105+
result_plan = query_planner(parse,
106+
parse->commandType,
107+
preprocessed_tlist,
108+
primary_qual);
109+
}
110+
98111
/*
99112
* For now, before we hand back the plan, check to see if there is a
100113
* user-specified sort that needs to be done. Eventually, this will
@@ -180,34 +193,6 @@ make_sortplan(List *tlist, List *sortcls, Plan *plannode)
180193
return (sortplan);
181194
}
182195

183-
184-
/*
185-
* init-query-planner--
186-
* Deals with all non-union preprocessing,and CNFifying the qualifications.
187-
*
188-
* Returns a query plan.
189-
* MODIFIES: tlist,qual
190-
*
191-
*/
192-
static Plan *
193-
init_query_planner(Query *root)
194-
{
195-
List *primary_qual;
196-
List *tlist = root->targetList;
197-
198-
tlist = preprocess_targetlist(tlist,
199-
root->commandType,
200-
root->resultRelation,
201-
root->rtable);
202-
203-
primary_qual = cnfify((Expr *) root->qual, true);
204-
205-
return (query_planner(root,
206-
root->commandType,
207-
tlist,
208-
primary_qual));
209-
}
210-
211196
/*
212197
* pg_checkretval() -- check return value of a list of sql parse
213198
* trees.

0 commit comments

Comments
 (0)