index.h 1.7 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.20 1999/12/10 03:56:05 momjian Exp $
10 11 12
 *
 *-------------------------------------------------------------------------
 */
13
#ifndef INDEX_H
14 15
#define INDEX_H

16
#include "access/itup.h"
B
Bruce Momjian 已提交
17
#include "nodes/execnodes.h"
18

19
extern Form_pg_am AccessMethodObjectIdGetForm(Oid accessMethodObjectId);
20

21
extern void UpdateIndexPredicate(Oid indexoid, Node *oldPred, Node *predicate);
22

23
extern void InitIndexStrategy(int numatts,
24 25
				  Relation indexRelation,
				  Oid accessMethodObjectId);
26

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

42
extern void index_drop(Oid indexId);
43

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

49
extern void UpdateStats(Oid relid, long reltuples, bool hasindex);
50

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

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

59 60
extern bool IndexIsUnique(Oid indexId);
extern bool IndexIsUniqueNoCache(Oid indexId);
61

62
#endif	 /* INDEX_H */