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  * Note that the primary entry points for planner.c are declared in
7  * optimizer/optimizer.h, because they're intended to be called from
8  * non-planner code. Declarations here are meant for use by other
9  * planner modules.
10  *
11  * Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
12  * Portions Copyright (c) 1994, Regents of the University of California
13  *
14  * src/include/optimizer/planner.h
15  *
16  *-------------------------------------------------------------------------
17  */
18 #ifndef PLANNER_H
19 #define PLANNER_H
20 
21 #include "nodes/pathnodes.h"
22 #include "nodes/plannodes.h"
23 
24 
25 /* Hook for plugins to get control in planner() */
26 typedef PlannedStmt *(*planner_hook_type) (Query *parse,
27  const char *query_string,
28  int cursorOptions,
29  ParamListInfo boundParams);
31 
32 /* Hook for plugins to get control when grouping_planner() plans upper rels */
34  UpperRelationKind stage,
35  RelOptInfo *input_rel,
36  RelOptInfo *output_rel,
37  void *extra);
39 
40 
41 extern PlannedStmt *standard_planner(Query *parse, const char *query_string,
42  int cursorOptions,
43  ParamListInfo boundParams);
44 
46  PlannerInfo *parent_root,
47  bool hasRecursion, double tuple_fraction,
48  SetOperationStmt *setops);
49 
51  LockClauseStrength strength);
52 
53 extern bool limit_needed(Query *parse);
54 
55 extern void mark_partial_aggref(Aggref *agg, AggSplit aggsplit);
56 
58  double tuple_fraction);
59 
61 
62 #endif /* PLANNER_H */
#define PGDLLIMPORT
Definition: c.h:1316
LockClauseStrength
Definition: lockoptions.h:22
AggSplit
Definition: nodes.h:374
UpperRelationKind
Definition: pathnodes.h:70
PlannerInfo * subquery_planner(PlannerGlobal *glob, Query *parse, PlannerInfo *parent_root, bool hasRecursion, double tuple_fraction, SetOperationStmt *setops)
Definition: planner.c:628
RowMarkType select_rowmark_type(RangeTblEntry *rte, LockClauseStrength strength)
Definition: planner.c:2377
void mark_partial_aggref(Aggref *agg, AggSplit aggsplit)
Definition: planner.c:5512
Expr * preprocess_phv_expression(PlannerInfo *root, Expr *expr)
Definition: planner.c:1272
bool limit_needed(Query *parse)
Definition: planner.c:2628
PlannedStmt * standard_planner(Query *parse, const char *query_string, int cursorOptions, ParamListInfo boundParams)
Definition: planner.c:287
PGDLLIMPORT create_upper_paths_hook_type create_upper_paths_hook
Definition: planner.c:74
PlannedStmt *(* planner_hook_type)(Query *parse, const char *query_string, int cursorOptions, ParamListInfo boundParams)
Definition: planner.h:26
Path * get_cheapest_fractional_path(RelOptInfo *rel, double tuple_fraction)
Definition: planner.c:6298
PGDLLIMPORT planner_hook_type planner_hook
Definition: planner.c:71
void(* create_upper_paths_hook_type)(PlannerInfo *root, UpperRelationKind stage, RelOptInfo *input_rel, RelOptInfo *output_rel, void *extra)
Definition: planner.h:33
RowMarkType
Definition: plannodes.h:1328
tree ctl root
Definition: radixtree.h:1884
static struct subre * parse(struct vars *v, int stopper, int type, struct state *init, struct state *final)
Definition: regcomp.c:715