OSDN Git Service

8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list
[pg-rex/syncrep.git] / src / include / optimizer / plancat.h
1 /*-------------------------------------------------------------------------
2  *
3  * plancat.h
4  *        prototypes for plancat.c.
5  *
6  *
7  * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
8  * Portions Copyright (c) 1994, Regents of the University of California
9  *
10  * $PostgreSQL: pgsql/src/include/optimizer/plancat.h,v 1.54 2009/06/11 14:49:11 momjian Exp $
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() */
21 typedef void (*get_relation_info_hook_type) (PlannerInfo *root,
22                                                                                                                  Oid relationObjectId,
23                                                                                                                  bool inhparent,
24                                                                                                                  RelOptInfo *rel);
25 extern PGDLLIMPORT get_relation_info_hook_type get_relation_info_hook;
26
27
28 extern void get_relation_info(PlannerInfo *root, Oid relationObjectId,
29                                   bool inhparent, RelOptInfo *rel);
30
31 extern void estimate_rel_size(Relation rel, int32 *attr_widths,
32                                   BlockNumber *pages, double *tuples);
33
34 extern bool relation_excluded_by_constraints(PlannerInfo *root,
35                                                                  RelOptInfo *rel, RangeTblEntry *rte);
36
37 extern List *build_physical_tlist(PlannerInfo *root, RelOptInfo *rel);
38
39 extern bool has_unique_index(RelOptInfo *rel, AttrNumber attno);
40
41 extern Selectivity restriction_selectivity(PlannerInfo *root,
42                                                 Oid operator,
43                                                 List *args,
44                                                 int varRelid);
45
46 extern Selectivity join_selectivity(PlannerInfo *root,
47                                  Oid operator,
48                                  List *args,
49                                  JoinType jointype,
50                                  SpecialJoinInfo *sjinfo);
51
52 #endif   /* PLANCAT_H */