index.h 1.9 KB
Newer Older
1 2 3
/*-------------------------------------------------------------------------
 *
 * index.h--
4
 *	  prototypes for index.c.
5 6 7 8
 *
 *
 * Copyright (c) 1994, Regents of the University of California
 *
9
 * $Id: index.h,v 1.6 1997/09/07 04:56:31 momjian Exp $
10 11 12
 *
 *-------------------------------------------------------------------------
 */
13
#ifndef INDEX_H
14 15
#define INDEX_H

M
Marc G. Fournier 已提交
16 17 18 19
#include <nodes/execnodes.h>
#include <nodes/parsenodes.h>
#include <access/itup.h>
#include <access/funcindex.h>
20

21 22
extern			Form_pg_am
				AccessMethodObjectIdGetAccessMethodTupleForm(Oid accessMethodObjectId);
23 24

extern void
25
				UpdateIndexPredicate(Oid indexoid, Node * oldPred, Node * predicate);
26

27 28 29 30
extern void
InitIndexStrategy(int numatts,
				  Relation indexRelation,
				  Oid accessMethodObjectId);
31

32 33 34 35 36
extern void
index_create(char *heapRelationName,
			 char *indexRelationName,
			 FuncIndexInfo * funcInfo,
			 List * attributeList,
37
			 Oid accessMethodObjectId,
38
			 int numatts,
39
			 AttrNumber attNums[],
40
			 Oid classObjectId[],
41
			 uint16 parameterCount,
42 43
			 Datum * parameter,
			 Node * predicate,
44 45
			 bool islossy,
			 bool unique);
46

47
extern void		index_destroy(Oid indexId);
48

49 50 51 52 53
extern void
FormIndexDatum(int numberOfAttributes,
			   AttrNumber attributeNumber[], HeapTuple heapTuple,
			   TupleDesc heapDescriptor, Buffer buffer, Datum * datum,
			   char *nullv, FuncIndexInfoPtr fInfo);
54

55
extern void		UpdateStats(Oid relid, long reltuples, bool hasindex);
56

57 58 59
extern void
FillDummyExprContext(ExprContext * econtext, TupleTableSlot * slot,
					 TupleDesc tupdesc, Buffer buffer);
60

61 62 63 64 65
extern void
index_build(Relation heapRelation, Relation indexRelation,
			int numberOfAttributes, AttrNumber attributeNumber[],
	  uint16 parameterCount, Datum * parameter, FuncIndexInfo * funcInfo,
			PredInfo * predInfo);
66

67 68
extern bool		IndexIsUnique(Oid indexId);
extern bool		IndexIsUniqueNoCache(Oid indexId);
69

70
#endif							/* INDEX_H */