PostgreSQL Source Code  git master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
planner.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * planner.h
4  * prototypes for planner.c.
5  *
6  *
7  * Portions Copyright (c) 1996-2017, PostgreSQL Global Development Group
8  * Portions Copyright (c) 1994, Regents of the University of California
9  *
10  * src/include/optimizer/planner.h
11  *
12  *-------------------------------------------------------------------------
13  */
14 #ifndef PLANNER_H
15 #define PLANNER_H
16 
17 #include "nodes/plannodes.h"
18 #include "nodes/relation.h"
19 
20 
21 /* Hook for plugins to get control in planner() */
22 typedef PlannedStmt *(*planner_hook_type) (Query *parse,
23  int cursorOptions,
24  ParamListInfo boundParams);
26 
27 /* Hook for plugins to get control when grouping_planner() plans upper rels */
29  UpperRelationKind stage,
30  RelOptInfo *input_rel,
31  RelOptInfo *output_rel);
33 
34 
35 extern PlannedStmt *planner(Query *parse, int cursorOptions,
36  ParamListInfo boundParams);
37 extern PlannedStmt *standard_planner(Query *parse, int cursorOptions,
38  ParamListInfo boundParams);
39 
41  PlannerInfo *parent_root,
42  bool hasRecursion, double tuple_fraction);
43 
44 extern bool is_dummy_plan(Plan *plan);
45 
47  LockClauseStrength strength);
48 
49 extern void mark_partial_aggref(Aggref *agg, AggSplit aggsplit);
50 
52  double tuple_fraction);
53 
54 extern Expr *expression_planner(Expr *expr);
55 
56 extern Expr *preprocess_phv_expression(PlannerInfo *root, Expr *expr);
57 
58 extern bool plan_cluster_use_sort(Oid tableOid, Oid indexOid);
59 
61 
62 #endif /* PLANNER_H */
RowMarkType select_rowmark_type(RangeTblEntry *rte, LockClauseStrength strength)
Definition: planner.c:2263
Expr * expression_planner(Expr *expr)
Definition: planner.c:5382
List * get_partitioned_child_rels(PlannerInfo *root, Index rti)
Definition: planner.c:5519
void(* create_upper_paths_hook_type)(PlannerInfo *root, UpperRelationKind stage, RelOptInfo *input_rel, RelOptInfo *output_rel)
Definition: planner.h:28
unsigned int Oid
Definition: postgres_ext.h:31
UpperRelationKind
Definition: relation.h:71
#define PGDLLIMPORT
Definition: c.h:1063
PlannedStmt * planner(Query *parse, int cursorOptions, ParamListInfo boundParams)
Definition: planner.c:176
PlannerInfo * subquery_planner(PlannerGlobal *glob, Query *parse, PlannerInfo *parent_root, bool hasRecursion, double tuple_fraction)
Definition: planner.c:455
Path * get_cheapest_fractional_path(RelOptInfo *rel, double tuple_fraction)
Definition: planner.c:5229
Expr * preprocess_phv_expression(PlannerInfo *root, Expr *expr)
Definition: planner.c:970
LockClauseStrength
Definition: lockoptions.h:21
PlannedStmt *(* planner_hook_type)(Query *parse, int cursorOptions, ParamListInfo boundParams)
Definition: planner.h:22
unsigned int Index
Definition: c.h:365
AggSplit
Definition: nodes.h:744
RowMarkType
Definition: plannodes.h:924
PGDLLIMPORT create_upper_paths_hook_type create_upper_paths_hook
Definition: planner.c:68
bool is_dummy_plan(Plan *plan)
Definition: planner.c:2127
PlannedStmt * standard_planner(Query *parse, int cursorOptions, ParamListInfo boundParams)
Definition: planner.c:188
bool plan_cluster_use_sort(Oid tableOid, Oid indexOid)
Definition: planner.c:5411
Definition: pg_list.h:45
Definition: relation.h:911
void mark_partial_aggref(Aggref *agg, AggSplit aggsplit)
Definition: planner.c:4678
static struct subre * parse(struct vars *, int, int, struct state *, struct state *)
Definition: regcomp.c:649
PGDLLIMPORT planner_hook_type planner_hook
Definition: planner.c:65