PostgreSQL Source Code  git master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
plancat.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * plancat.h
4  * prototypes for plancat.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/plancat.h
11  *
12  *-------------------------------------------------------------------------
13  */
14 #ifndef PLANCAT_H
15 #define PLANCAT_H
16 
17 #include "nodes/relation.h"
18 #include "utils/relcache.h"
19 
20 /* Hook for plugins to get control in get_relation_info() */
22  Oid relationObjectId,
23  bool inhparent,
24  RelOptInfo *rel);
26 
27 
28 extern void get_relation_info(PlannerInfo *root, Oid relationObjectId,
29  bool inhparent, RelOptInfo *rel);
30 
32 
33 extern void estimate_rel_size(Relation rel, int32 *attr_widths,
34  BlockNumber *pages, double *tuples, double *allvisfrac);
35 
36 extern int32 get_relation_data_width(Oid relid, int32 *attr_widths);
37 
39  RelOptInfo *rel, RangeTblEntry *rte);
40 
41 extern List *build_physical_tlist(PlannerInfo *root, RelOptInfo *rel);
42 
43 extern bool has_unique_index(RelOptInfo *rel, AttrNumber attno);
44 
46  Oid operatorid,
47  List *args,
48  Oid inputcollid,
49  int varRelid);
50 
52  Oid operatorid,
53  List *args,
54  Oid inputcollid,
55  JoinType jointype,
56  SpecialJoinInfo *sjinfo);
57 
58 extern bool has_row_triggers(PlannerInfo *root, Index rti, CmdType event);
59 
60 #endif /* PLANCAT_H */
void get_relation_info(PlannerInfo *root, Oid relationObjectId, bool inhparent, RelOptInfo *rel)
Definition: plancat.c:105
Selectivity join_selectivity(PlannerInfo *root, Oid operatorid, List *args, Oid inputcollid, JoinType jointype, SpecialJoinInfo *sjinfo)
Definition: plancat.c:1701
bool has_row_triggers(PlannerInfo *root, Index rti, CmdType event)
Definition: plancat.c:1777
uint32 BlockNumber
Definition: block.h:31
double Selectivity
Definition: nodes.h:639
unsigned int Oid
Definition: postgres_ext.h:31
#define PGDLLIMPORT
Definition: c.h:1052
signed int int32
Definition: c.h:246
JoinType
Definition: nodes.h:673
int32 get_relation_data_width(Oid relid, int32 *attr_widths)
Definition: plancat.c:1121
Selectivity restriction_selectivity(PlannerInfo *root, Oid operatorid, List *args, Oid inputcollid, int varRelid)
Definition: plancat.c:1664
PGDLLIMPORT get_relation_info_hook_type get_relation_info_hook
Definition: plancat.c:57
List * build_physical_tlist(PlannerInfo *root, RelOptInfo *rel)
Definition: plancat.c:1481
unsigned int Index
Definition: c.h:359
void estimate_rel_size(Relation rel, int32 *attr_widths, BlockNumber *pages, double *tuples, double *allvisfrac)
Definition: plancat.c:919
void(* get_relation_info_hook_type)(PlannerInfo *root, Oid relationObjectId, bool inhparent, RelOptInfo *rel)
Definition: plancat.h:21
Definition: pg_list.h:45
int16 AttrNumber
Definition: attnum.h:21
CmdType
Definition: nodes.h:649
bool relation_excluded_by_constraints(PlannerInfo *root, RelOptInfo *rel, RangeTblEntry *rte)
Definition: plancat.c:1356
bool has_unique_index(RelOptInfo *rel, AttrNumber attno)
Definition: plancat.c:1745
List * infer_arbiter_indexes(PlannerInfo *root)
Definition: plancat.c:569