mirror of
https://github.com/postgres/postgres.git
synced 2025-05-28 00:03:23 -04:00
Remove init_query_planner(), merged into planner().
This commit is contained in:
parent
e9182152ec
commit
72c296dffc
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planner.c,v 1.12 1997/12/18 12:54:11 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planner.c,v 1.13 1997/12/18 19:41:44 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -47,7 +47,6 @@
|
|||||||
#include "executor/executor.h"
|
#include "executor/executor.h"
|
||||||
|
|
||||||
static Plan *make_sortplan(List *tlist, List *sortcls, Plan *plannode);
|
static Plan *make_sortplan(List *tlist, List *sortcls, Plan *plannode);
|
||||||
static Plan *init_query_planner(Query *parse);
|
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
*
|
*
|
||||||
@ -77,6 +76,8 @@ planner(Query *parse)
|
|||||||
|
|
||||||
Plan *result_plan = (Plan *) NULL;
|
Plan *result_plan = (Plan *) NULL;
|
||||||
|
|
||||||
|
List *preprocessed_tlist = NIL;
|
||||||
|
List *primary_qual;
|
||||||
int rt_index;
|
int rt_index;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -93,7 +94,19 @@ planner(Query *parse)
|
|||||||
if (special_plans)
|
if (special_plans)
|
||||||
result_plan = special_plans;
|
result_plan = special_plans;
|
||||||
else
|
else
|
||||||
result_plan = init_query_planner(parse); /* regular plans */
|
{
|
||||||
|
preprocessed_tlist = preprocess_targetlist(tlist,
|
||||||
|
parse->commandType,
|
||||||
|
parse->resultRelation,
|
||||||
|
parse->rtable);
|
||||||
|
|
||||||
|
primary_qual = cnfify((Expr *) parse->qual, true);
|
||||||
|
|
||||||
|
result_plan = query_planner(parse,
|
||||||
|
parse->commandType,
|
||||||
|
preprocessed_tlist,
|
||||||
|
primary_qual);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* For now, before we hand back the plan, check to see if there is a
|
* For now, before we hand back the plan, check to see if there is a
|
||||||
@ -180,34 +193,6 @@ make_sortplan(List *tlist, List *sortcls, Plan *plannode)
|
|||||||
return (sortplan);
|
return (sortplan);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* init-query-planner--
|
|
||||||
* Deals with all non-union preprocessing,and CNFifying the qualifications.
|
|
||||||
*
|
|
||||||
* Returns a query plan.
|
|
||||||
* MODIFIES: tlist,qual
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
static Plan *
|
|
||||||
init_query_planner(Query *root)
|
|
||||||
{
|
|
||||||
List *primary_qual;
|
|
||||||
List *tlist = root->targetList;
|
|
||||||
|
|
||||||
tlist = preprocess_targetlist(tlist,
|
|
||||||
root->commandType,
|
|
||||||
root->resultRelation,
|
|
||||||
root->rtable);
|
|
||||||
|
|
||||||
primary_qual = cnfify((Expr *) root->qual, true);
|
|
||||||
|
|
||||||
return (query_planner(root,
|
|
||||||
root->commandType,
|
|
||||||
tlist,
|
|
||||||
primary_qual));
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* pg_checkretval() -- check return value of a list of sql parse
|
* pg_checkretval() -- check return value of a list of sql parse
|
||||||
* trees.
|
* trees.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user