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.27 2000/07/04 06:11:54 tgl 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 21
extern Form_pg_am AccessMethodObjectIdGetForm(Oid accessMethodObjectId,
											  MemoryContext resultCxt);
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
			 Node *predicate,
38
			 bool islossy,
39
			 bool unique,
40 41
			 bool primary,
			 bool allow_system_table_mods);
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 61 62
						int numberOfAttributes, AttrNumber *attributeNumber,
						FuncIndexInfo *funcInfo, PredInfo *predInfo,
						bool unique);
63

64
extern bool IndexIsUnique(Oid indexId);
65

H
Hiroshi Inoue 已提交
66 67 68
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);
69

70
#endif	 /* INDEX_H */