OSDN Git Service

Change #include's to use <> and "" as appropriate.
[pg-rex/syncrep.git] / src / include / optimizer / plancat.h
1 /*-------------------------------------------------------------------------
2  *
3  * plancat.h
4  *        prototypes for plancat.c.
5  *
6  *
7  * Copyright (c) 1994, Regents of the University of California
8  *
9  * $Id: plancat.h,v 1.12 1999/07/15 23:03:58 momjian Exp $
10  *
11  *-------------------------------------------------------------------------
12  */
13 #ifndef PLANCAT_H
14 #define PLANCAT_H
15
16 #include "nodes/parsenodes.h"
17
18 /*
19  * transient data structure to hold return value of index_info. Note that
20  * indexkeys, orderOprs and classlist is "null-terminated".
21  */
22 typedef struct IdxInfoRetval
23 {
24         Oid                     relid;                  /* OID of the index relation (not the OID
25                                                                  * of the relation being indexed) */
26         Oid                     relam;                  /* OID of the pg_am of this index */
27         int                     pages;                  /* number of pages in the index relation */
28         int                     tuples;                 /* number of tuples in the index relation */
29         int                *indexkeys;          /* keys over which we're indexing */
30         Oid                *orderOprs;          /* operators used for ordering purposes */
31         Oid                *classlist;          /* classes of AM operators */
32         Oid                     indproc;
33         Node       *indpred;
34 } IdxInfoRetval;
35
36
37 extern void relation_info(Query *root,
38                           Oid relid,
39                           bool *hashindex, int *pages,
40                           int *tuples);
41
42 extern bool index_info(Query *root,
43                    bool first, int relid, IdxInfoRetval *info);
44
45 extern Cost restriction_selectivity(Oid functionObjectId,
46                                                 Oid operatorObjectId,
47                                                 Oid relationObjectId,
48                                                 AttrNumber attributeNumber,
49                                                 char *constValue,
50                                                 int32 constFlag);
51
52 extern void index_selectivity(Oid indid, Oid *classes, List *opnos,
53                                   Oid relid, List *attnos, List *values, List *flags,
54                                   int32 nkeys, float *idxPages, float *idxSelec);
55
56 extern Cost join_selectivity(Oid functionObjectId, Oid operatorObjectId,
57                                  Oid relationObjectId1, AttrNumber attributeNumber1,
58                                  Oid relationObjectId2, AttrNumber attributeNumber2);
59
60 extern List *find_inheritance_children(Oid inhparent);
61
62 #endif   /* PLANCAT_H */