1 /*-------------------------------------------------------------------------
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
12 *-------------------------------------------------------------------------
17 #include "nodes/execnodes.h"
20 #define DEFAULT_INDEX_TYPE "btree"
22 /* Typedef for callback function for IndexBuildHeapScan */
23 typedef void (*IndexBuildCallback
) (Relation index
,
31 extern Oid
index_create(Oid heapRelationId
,
32 const char *indexRelationName
,
35 Oid accessMethodObjectId
,
42 bool allow_system_table_mods
,
46 extern void index_drop(Oid indexId
);
48 extern IndexInfo
*BuildIndexInfo(Relation index
);
50 extern void FormIndexDatum(IndexInfo
*indexInfo
,
56 extern void setNewRelfilenode(Relation relation
, TransactionId freezeXid
);
58 extern void index_build(Relation heapRelation
,
59 Relation indexRelation
,
63 extern double IndexBuildHeapScan(Relation heapRelation
,
64 Relation indexRelation
,
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
);