PostgreSQL Source Code: src/include/optimizer/plancat.h Source File

PostgreSQL Source Code git master
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-2025, 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/pathnodes.h"
18#include "utils/relcache.h"
19
20/* Hook for plugins to get control in get_relation_info() */
21 typedef void (*get_relation_info_hook_type) (PlannerInfo *root,
22 Oid relationObjectId,
23 bool inhparent,
24 RelOptInfo *rel);
25extern PGDLLIMPORT get_relation_info_hook_type get_relation_info_hook;
26
27
28extern void get_relation_info(PlannerInfo *root, Oid relationObjectId,
29 bool inhparent, RelOptInfo *rel);
30
31extern void get_relation_notnullatts(PlannerInfo *root, Relation relation);
32
33extern Bitmapset *find_relation_notnullatts(PlannerInfo *root, Oid relid);
34
35extern List *infer_arbiter_indexes(PlannerInfo *root);
36
37extern void estimate_rel_size(Relation rel, int32 *attr_widths,
38 BlockNumber *pages, double *tuples, double *allvisfrac);
39
40extern int32 get_rel_data_width(Relation rel, int32 *attr_widths);
41extern int32 get_relation_data_width(Oid relid, int32 *attr_widths);
42
43extern bool relation_excluded_by_constraints(PlannerInfo *root,
44 RelOptInfo *rel, RangeTblEntry *rte);
45
46extern List *build_physical_tlist(PlannerInfo *root, RelOptInfo *rel);
47
48extern bool has_unique_index(RelOptInfo *rel, AttrNumber attno);
49
50extern Selectivity restriction_selectivity(PlannerInfo *root,
51 Oid operatorid,
52 List *args,
53 Oid inputcollid,
54 int varRelid);
55
56extern Selectivity join_selectivity(PlannerInfo *root,
57 Oid operatorid,
58 List *args,
59 Oid inputcollid,
60 JoinType jointype,
61 SpecialJoinInfo *sjinfo);
62
63extern Selectivity function_selectivity(PlannerInfo *root,
64 Oid funcid,
65 List *args,
66 Oid inputcollid,
67 bool is_join,
68 int varRelid,
69 JoinType jointype,
70 SpecialJoinInfo *sjinfo);
71
72extern void add_function_cost(PlannerInfo *root, Oid funcid, Node *node,
73 QualCost *cost);
74
75extern double get_function_rows(PlannerInfo *root, Oid funcid, Node *node);
76
77extern bool has_row_triggers(PlannerInfo *root, Index rti, CmdType event);
78
79extern bool has_transition_tables(PlannerInfo *root, Index rti, CmdType event);
80
81extern bool has_stored_generated_columns(PlannerInfo *root, Index rti);
82
83extern Bitmapset *get_dependent_generated_columns(PlannerInfo *root, Index rti,
84 Bitmapset *target_cols);
85
86#endif /* PLANCAT_H */
int16 AttrNumber
Definition: attnum.h:21
uint32 BlockNumber
Definition: block.h:31
#define PGDLLIMPORT
Definition: c.h:1319
int32_t int32
Definition: c.h:534
unsigned int Index
Definition: c.h:619
CmdType
Definition: nodes.h:273
double Selectivity
Definition: nodes.h:260
JoinType
Definition: nodes.h:298
void estimate_rel_size(Relation rel, int32 *attr_widths, BlockNumber *pages, double *tuples, double *allvisfrac)
Definition: plancat.c:1156
PGDLLIMPORT get_relation_info_hook_type get_relation_info_hook
Definition: plancat.c:61
void(* get_relation_info_hook_type)(PlannerInfo *root, Oid relationObjectId, bool inhparent, RelOptInfo *rel)
Definition: plancat.h:21
int32 get_rel_data_width(Relation rel, int32 *attr_widths)
Definition: plancat.c:1281
bool has_stored_generated_columns(PlannerInfo *root, Index rti)
Definition: plancat.c:2461
void get_relation_notnullatts(PlannerInfo *root, Relation relation)
Definition: plancat.c:682
bool relation_excluded_by_constraints(PlannerInfo *root, RelOptInfo *rel, RangeTblEntry *rte)
Definition: plancat.c:1700
double get_function_rows(PlannerInfo *root, Oid funcid, Node *node)
Definition: plancat.c:2267
bool has_row_triggers(PlannerInfo *root, Index rti, CmdType event)
Definition: plancat.c:2357
void add_function_cost(PlannerInfo *root, Oid funcid, Node *node, QualCost *cost)
Definition: plancat.c:2206
List * build_physical_tlist(PlannerInfo *root, RelOptInfo *rel)
Definition: plancat.c:1890
Selectivity restriction_selectivity(PlannerInfo *root, Oid operatorid, List *args, Oid inputcollid, int varRelid)
Definition: plancat.c:2073
int32 get_relation_data_width(Oid relid, int32 *attr_widths)
Definition: plancat.c:1323
bool has_unique_index(RelOptInfo *rel, AttrNumber attno)
Definition: plancat.c:2325
Bitmapset * find_relation_notnullatts(PlannerInfo *root, Oid relid)
Definition: plancat.c:755
bool has_transition_tables(PlannerInfo *root, Index rti, CmdType event)
Definition: plancat.c:2407
Selectivity join_selectivity(PlannerInfo *root, Oid operatorid, List *args, Oid inputcollid, JoinType jointype, SpecialJoinInfo *sjinfo)
Definition: plancat.c:2112
Selectivity function_selectivity(PlannerInfo *root, Oid funcid, List *args, Oid inputcollid, bool is_join, int varRelid, JoinType jointype, SpecialJoinInfo *sjinfo)
Definition: plancat.c:2152
Bitmapset * get_dependent_generated_columns(PlannerInfo *root, Index rti, Bitmapset *target_cols)
Definition: plancat.c:2488
void get_relation_info(PlannerInfo *root, Oid relationObjectId, bool inhparent, RelOptInfo *rel)
Definition: plancat.c:124
List * infer_arbiter_indexes(PlannerInfo *root)
Definition: plancat.c:794
unsigned int Oid
Definition: postgres_ext.h:32
tree ctl root
Definition: radixtree.h:1857
Definition: pg_list.h:54
Definition: nodes.h:135
Definition: rel.h:56

AltStyle によって変換されたページ (->オリジナル) /