1 /*-------------------------------------------------------------------------
4 * prototypes for index.c.
7 * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
8 * Portions Copyright (c) 1994, Regents of the University of California
10 * $Id: index.h,v 1.39 2001/08/21 16:36:05 tgl Exp $
12 *-------------------------------------------------------------------------
17 #include "access/itup.h"
18 #include "nodes/execnodes.h"
21 /* Typedef for callback function for IndexBuildHeapScan */
22 typedef void (*IndexBuildCallback) (Relation index,
30 extern Form_pg_am AccessMethodObjectIdGetForm(Oid accessMethodObjectId,
31 MemoryContext resultCxt);
33 extern void InitIndexStrategy(int numatts,
34 Relation indexRelation,
35 Oid accessMethodObjectId);
37 extern Oid index_create(char *heapRelationName,
38 char *indexRelationName,
40 Oid accessMethodObjectId,
43 bool allow_system_table_mods);
45 extern void index_drop(Oid indexId);
47 extern IndexInfo *BuildIndexInfo(HeapTuple indexTuple);
49 extern void FormIndexDatum(IndexInfo *indexInfo,
51 TupleDesc heapDescriptor,
52 MemoryContext resultCxt,
56 extern void UpdateStats(Oid relid, double reltuples);
57 extern bool IndexesAreActive(Oid relid, bool comfirmCommitted);
58 extern void setRelhasindex(Oid relid, bool hasindex,
59 bool isprimary, Oid reltoastidxid);
61 extern void setNewRelfilenode(Relation relation);
63 extern bool SetReindexProcessing(bool processing);
64 extern bool IsReindexProcessing(void);
66 extern void index_build(Relation heapRelation, Relation indexRelation,
67 IndexInfo *indexInfo);
69 extern double IndexBuildHeapScan(Relation heapRelation,
70 Relation indexRelation,
72 IndexBuildCallback callback,
73 void *callback_state);
75 extern bool reindex_index(Oid indexId, bool force, bool inplace);
76 extern bool activate_indexes_of_a_table(Oid relid, bool activate);
77 extern bool reindex_relation(Oid relid, bool force);