Fix obsolete comment regarding FSM truncation.
[PostgreSQL.git] / src / include / catalog / index.h
blob322f1a991c852afd8b7d81a5cce0bc2065b173ce
1 /*-------------------------------------------------------------------------
3 * index.h
4 * prototypes for catalog/index.c.
7 * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
8 * Portions Copyright (c) 1994, Regents of the University of California
10 * $PostgreSQL$
12 *-------------------------------------------------------------------------
14 #ifndef INDEX_H
15 #define INDEX_H
17 #include "nodes/execnodes.h"
20 #define DEFAULT_INDEX_TYPE "btree"
22 /* Typedef for callback function for IndexBuildHeapScan */
23 typedef void (*IndexBuildCallback) (Relation index,
24 HeapTuple htup,
25 Datum *values,
26 bool *isnull,
27 bool tupleIsAlive,
28 void *state);
31 extern Oid index_create(Oid heapRelationId,
32 const char *indexRelationName,
33 Oid indexRelationId,
34 IndexInfo *indexInfo,
35 Oid accessMethodObjectId,
36 Oid tableSpaceId,
37 Oid *classObjectId,
38 int16 *coloptions,
39 Datum reloptions,
40 bool isprimary,
41 bool isconstraint,
42 bool allow_system_table_mods,
43 bool skip_build,
44 bool concurrent);
46 extern void index_drop(Oid indexId);
48 extern IndexInfo *BuildIndexInfo(Relation index);
50 extern void FormIndexDatum(IndexInfo *indexInfo,
51 TupleTableSlot *slot,
52 EState *estate,
53 Datum *values,
54 bool *isnull);
56 extern void setNewRelfilenode(Relation relation, TransactionId freezeXid);
58 extern void index_build(Relation heapRelation,
59 Relation indexRelation,
60 IndexInfo *indexInfo,
61 bool isprimary);
63 extern double IndexBuildHeapScan(Relation heapRelation,
64 Relation indexRelation,
65 IndexInfo *indexInfo,
66 bool allow_sync,
67 IndexBuildCallback callback,
68 void *callback_state);
70 extern void validate_index(Oid heapId, Oid indexId, Snapshot snapshot);
72 extern void reindex_index(Oid indexId);
73 extern bool reindex_relation(Oid relid, bool toast_too);
75 #endif /* INDEX_H */