]> granicus.if.org Git - postgresql/blob - src/include/optimizer/subselect.h
Create the planner mechanism for optimizing simple MIN and MAX queries
[postgresql] / src / include / optimizer / subselect.h
1 /*-------------------------------------------------------------------------
2  *
3  * subselect.h
4  *
5  * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
6  * Portions Copyright (c) 1994, Regents of the University of California
7  *
8  * $PostgreSQL: pgsql/src/include/optimizer/subselect.h,v 1.24 2005/04/11 23:06:56 tgl Exp $
9  *
10  *-------------------------------------------------------------------------
11  */
12 #ifndef SUBSELECT_H
13 #define SUBSELECT_H
14
15 #include "nodes/parsenodes.h"
16 #include "nodes/plannodes.h"
17
18 extern Index PlannerQueryLevel; /* level of current query */
19 extern List *PlannerInitPlan;   /* init subplans for current query */
20 extern List *PlannerParamList;  /* to keep track of cross-level Params */
21 extern int      PlannerPlanId;          /* to assign unique ID to subquery plans */
22
23 extern Node *convert_IN_to_join(Query *parse, SubLink *sublink);
24 extern Node *SS_replace_correlation_vars(Node *expr);
25 extern Node *SS_process_sublinks(Node *expr, bool isQual);
26 extern void SS_finalize_plan(Plan *plan, List *rtable);
27 extern Param *SS_make_initplan_from_plan(Query *root, Plan *plan,
28                                                                                  Oid resulttype, int32 resulttypmod);
29
30 #endif   /* SUBSELECT_H */