1 /*-------------------------------------------------------------------------
4 * prototypes for index.c.
7 * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
8 * Portions Copyright (c) 1994, Regents of the University of California
10 * $Id: index.h,v 1.52 2003/08/04 02:40:10 momjian Exp $
12 *-------------------------------------------------------------------------
17 #include "access/itup.h"
18 #include "catalog/pg_index.h"
19 #include "nodes/execnodes.h"
22 #define DEFAULT_INDEX_TYPE "btree"
24 /* Typedef for callback function for IndexBuildHeapScan */
25 typedef void (*IndexBuildCallback) (Relation index,
33 extern Oid index_create(Oid heapRelationId,
34 const char *indexRelationName,
36 Oid accessMethodObjectId,
40 bool allow_system_table_mods);
42 extern void index_drop(Oid indexId);
44 extern IndexInfo *BuildIndexInfo(Relation index);
46 extern void FormIndexDatum(IndexInfo *indexInfo,
48 TupleDesc heapDescriptor,
53 extern void UpdateStats(Oid relid, double reltuples);
54 extern bool IndexesAreActive(Relation heaprel);
55 extern void setRelhasindex(Oid relid, bool hasindex,
56 bool isprimary, Oid reltoastidxid);
58 extern void setNewRelfilenode(Relation relation);
60 extern bool SetReindexProcessing(bool processing);
61 extern bool IsReindexProcessing(void);
63 extern void index_build(Relation heapRelation, Relation indexRelation,
64 IndexInfo *indexInfo);
66 extern double IndexBuildHeapScan(Relation heapRelation,
67 Relation indexRelation,
69 IndexBuildCallback callback,
70 void *callback_state);
72 extern bool activate_indexes_of_a_table(Relation heaprel, bool activate);
74 extern bool reindex_index(Oid indexId, bool force, bool inplace);
75 extern bool reindex_relation(Oid relid, bool force);