diff options
| author | Marc G. Fournier <scrappy@hub.org> | 1996-08-28 07:27:54 +0000 |
|---|---|---|
| committer | Marc G. Fournier <scrappy@hub.org> | 1996-08-28 07:27:54 +0000 |
| commit | 870be9fa8e5ead7a9fec1b1cf539c701bba57d2a (patch) | |
| tree | 0980ed1b45ec7974d2ceea9df3d0570c165804b6 /src/include/optimizer/plancat.h | |
| parent | 907c884fe8b88d3df5883c278cacb094a1cfc7ac (diff) | |
| download | postgresql-870be9fa8e5ead7a9fec1b1cf539c701bba57d2a.tar.gz | |
Clean up th ecompile process by centralizing the include files
- code compile tested, but due to a yet unresolved problem with
parse.h's creation, compile not completed...
Diffstat (limited to 'src/include/optimizer/plancat.h')
| -rw-r--r-- | src/include/optimizer/plancat.h | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/src/include/optimizer/plancat.h b/src/include/optimizer/plancat.h new file mode 100644 index 0000000000..3279985b16 --- /dev/null +++ b/src/include/optimizer/plancat.h @@ -0,0 +1,65 @@ +/*------------------------------------------------------------------------- + * + * plancat.h-- + * prototypes for plancat.c. + * + * + * Copyright (c) 1994, Regents of the University of California + * + * $Id: plancat.h,v 1.1 1996/08/28 07:23:20 scrappy Exp $ + * + *------------------------------------------------------------------------- + */ +#ifndef PLANCAT_H +#define PLANCAT_H + +#include "c.h" + +/* + * transient data structure to hold return value of index_info. Note that + * indexkeys, orderOprs and classlist is "null-terminated". + */ +typedef struct IdxInfoRetval { + Oid relid; /* OID of the index relation (not the OID + * of the relation being indexed) + */ + Oid relam; /* OID of the pg_am of this index */ + int pages; /* number of pages in the index relation */ + int tuples; /* number of tuples in the index relation */ + int *indexkeys; /* keys over which we're indexing */ + Oid *orderOprs; /* operators used for ordering purposes */ + Oid *classlist; /* classes of AM operators */ + Oid indproc; + Node *indpred; +} IdxInfoRetval; + + +extern void relation_info(Query *root, + Oid relid, + bool *hashindex, int *pages, + int *tuples); + +extern bool index_info(Query *root, + bool first, int relid, IdxInfoRetval *info); + +extern Cost +restriction_selectivity(Oid functionObjectId, + Oid operatorObjectId, + Oid relationObjectId, + AttrNumber attributeNumber, + char *constValue, + int32 constFlag); + +extern void +index_selectivity(Oid indid, Oid *classes, List *opnos, + Oid relid, List *attnos, List *values, List *flags, + int32 nkeys, float *idxPages, float *idxSelec); + +extern Cost join_selectivity(Oid functionObjectId, Oid operatorObjectId, + Oid relationObjectId1, AttrNumber attributeNumber1, + Oid relationObjectId2, AttrNumber attributeNumber2); + +extern List *find_inheritance_children(Oid inhparent); +extern List *VersionGetParents(Oid verrelid); + +#endif /* PLANCAT_H */ |
