1 /*-------------------------------------------------------------------------
4 * prototypes for plancat.c.
7 * Copyright (c) 1994, Regents of the University of California
9 * $Id: plancat.h,v 1.6 1997/09/08 21:53:27 momjian Exp $
11 *-------------------------------------------------------------------------
16 #include <nodes/parsenodes.h>
19 * transient data structure to hold return value of index_info. Note that
20 * indexkeys, orderOprs and classlist is "null-terminated".
22 typedef struct IdxInfoRetval
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 */
38 relation_info(Query *root,
40 bool *hashindex, int *pages,
44 index_info(Query *root,
45 bool first, int relid, IdxInfoRetval *info);
48 restriction_selectivity(Oid functionObjectId,
51 AttrNumber attributeNumber,
56 index_selectivity(Oid indid, Oid *classes, List *opnos,
57 Oid relid, List *attnos, List *values, List *flags,
58 int32 nkeys, float *idxPages, float *idxSelec);
61 join_selectivity(Oid functionObjectId, Oid operatorObjectId,
62 Oid relationObjectId1, AttrNumber attributeNumber1,
63 Oid relationObjectId2, AttrNumber attributeNumber2);
65 extern List *find_inheritance_children(Oid inhparent);
66 extern List *VersionGetParents(Oid verrelid);
68 #endif /* PLANCAT_H */