index.h 2.2 KB
Newer Older
1 2
/*-------------------------------------------------------------------------
 *
3
 * index.h
4
 *	  prototypes for index.c.
5 6
 *
 *
B
Add:  
Bruce Momjian 已提交
7 8
 * Portions Copyright (c) 1996-2000, PostgreSQL, Inc
 * Portions Copyright (c) 1994, Regents of the University of California
9
 *
10
 * $Id: index.h,v 1.24 2000/06/08 22:37:39 momjian Exp $
11 12 13
 *
 *-------------------------------------------------------------------------
 */
14
#ifndef INDEX_H
15 16
#define INDEX_H

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

20
extern Form_pg_am AccessMethodObjectIdGetForm(Oid accessMethodObjectId);
21

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

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

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

43
extern void index_drop(Oid indexId);
44

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

H
Hiroshi Inoue 已提交
50 51 52 53 54
extern void UpdateStats(Oid relid, long reltuples, bool inplace);
extern bool IndexesAreActive(Oid relid, bool comfirmCommitted);
extern void setRelhasindexInplace(Oid relid, bool hasindex, bool immediate);
extern bool SetReindexProcessing(bool processing);
extern bool IsReindexProcessing(void);
55

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

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

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

H
Hiroshi Inoue 已提交
67 68 69
extern bool reindex_index(Oid indexId, bool force);
extern bool activate_indexes_of_a_table(Oid relid, bool activate);
extern bool reindex_relation(Oid relid, bool force);
70

71
#endif	 /* INDEX_H */