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.14 1999/01/21 22:48:14 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 AccessMethodObjectIdGetForm(Oid accessMethodObjectId);
22

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

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

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

44
extern void index_destroy(Oid indexId);
45

46
extern void FormIndexDatum(int numberOfAttributes,
47
			   AttrNumber *attributeNumber, HeapTuple heapTuple,
48
			   TupleDesc heapDescriptor, Datum *datum,
49
			   char *nullv, FuncIndexInfoPtr fInfo);
50

51
extern void UpdateStats(Oid relid, long reltuples, bool hasindex);
52

53
extern void FillDummyExprContext(ExprContext *econtext, TupleTableSlot *slot,
54
					 TupleDesc tupdesc, Buffer buffer);
55

56
extern void index_build(Relation heapRelation, Relation indexRelation,
57
			int numberOfAttributes, AttrNumber *attributeNumber,
58 59
		uint16 parameterCount, Datum *parameter, FuncIndexInfo *funcInfo,
			PredInfo *predInfo);
60

61 62
extern bool IndexIsUnique(Oid indexId);
extern bool IndexIsUniqueNoCache(Oid indexId);
63

64
#endif	 /* INDEX_H */