PostgreSQL Source Code  git master
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-2018, 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,
32  void *extra);
34 
35 
36 extern PlannedStmt *planner(Query *parse, int cursorOptions,
37  ParamListInfo boundParams);
38 extern PlannedStmt *standard_planner(Query *parse, int cursorOptions,
39  ParamListInfo boundParams);
40 
42  PlannerInfo *parent_root,
43  bool hasRecursion, double tuple_fraction);
44 
45 extern bool is_dummy_plan(Plan *plan);
46 
48  LockClauseStrength strength);
49 
50 extern void mark_partial_aggref(Aggref *agg, AggSplit aggsplit);
51 
53  double tuple_fraction);
54 
55 extern Expr *expression_planner(Expr *expr);
56 
57 extern Expr *preprocess_phv_expression(PlannerInfo *root, Expr *expr);
58 
59 extern bool plan_cluster_use_sort(Oid tableOid, Oid indexOid);
60 extern int plan_create_index_workers(Oid tableOid, Oid indexOid);
61 
62 #endif /* PLANNER_H */
RowMarkType select_rowmark_type(RangeTblEntry *rte, LockClauseStrength strength)
Definition: planner.c:2613
Expr * expression_planner(Expr *expr)
Definition: planner.c:5888
unsigned int Oid
Definition: postgres_ext.h:31
UpperRelationKind
Definition: relation.h:72
#define PGDLLIMPORT
Definition: c.h:1140
int plan_create_index_workers(Oid tableOid, Oid indexOid)
Definition: planner.c:6034
PlannedStmt * planner(Query *parse, int cursorOptions, ParamListInfo boundParams)
Definition: planner.c:256
PlannerInfo * subquery_planner(PlannerGlobal *glob, Query *parse, PlannerInfo *parent_root, bool hasRecursion, double tuple_fraction)
Definition: planner.c:594
Path * get_cheapest_fractional_path(RelOptInfo *rel, double tuple_fraction)
Definition: planner.c:5735
Expr * preprocess_phv_expression(PlannerInfo *root, Expr *expr)
Definition: planner.c:1131
LockClauseStrength
Definition: lockoptions.h:21
void(* create_upper_paths_hook_type)(PlannerInfo *root, UpperRelationKind stage, RelOptInfo *input_rel, RelOptInfo *output_rel, void *extra)
Definition: planner.h:28
PlannedStmt *(* planner_hook_type)(Query *parse, int cursorOptions, ParamListInfo boundParams)
Definition: planner.h:22
AggSplit
Definition: nodes.h:765
RowMarkType
Definition: plannodes.h:984
PGDLLIMPORT create_upper_paths_hook_type create_upper_paths_hook
Definition: planner.c:71
bool is_dummy_plan(Plan *plan)
Definition: planner.c:2477
PlannedStmt * standard_planner(Query *parse, int cursorOptions, ParamListInfo boundParams)
Definition: planner.c:268
bool plan_cluster_use_sort(Oid tableOid, Oid indexOid)
Definition: planner.c:5917
void mark_partial_aggref(Aggref *agg, AggSplit aggsplit)
Definition: planner.c:5184
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:68