index.h 1.8 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.10 1998/02/26 04:40:40 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
extern Form_pg_am AccessMethodObjectIdGetAccessMethodTupleForm(Oid accessMethodObjectId);
22

23
extern void UpdateIndexPredicate(Oid indexoid, Node *oldPred, Node *predicate);
24

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

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

45
extern void index_destroy(Oid indexId);
46

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

53
extern void UpdateStats(Oid relid, long reltuples, bool hasindex);
54

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

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

65 66
extern bool IndexIsUnique(Oid indexId);
extern bool IndexIsUniqueNoCache(Oid indexId);
67

68
#endif							/* INDEX_H */