1 /*-------------------------------------------------------------------------
4 * prototypes for plancat.c.
7 * Copyright (c) 1994, Regents of the University of California
9 * $Id: plancat.h,v 1.12 1999/07/15 23:03:58 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 */
37 extern void relation_info(Query *root,
39 bool *hashindex, int *pages,
42 extern bool index_info(Query *root,
43 bool first, int relid, IdxInfoRetval *info);
45 extern Cost restriction_selectivity(Oid functionObjectId,
48 AttrNumber attributeNumber,
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);
56 extern Cost join_selectivity(Oid functionObjectId, Oid operatorObjectId,
57 Oid relationObjectId1, AttrNumber attributeNumber1,
58 Oid relationObjectId2, AttrNumber attributeNumber2);
60 extern List *find_inheritance_children(Oid inhparent);
62 #endif /* PLANCAT_H */