]> granicus.if.org Git - postgresql/blob - src/include/catalog/index.h
Rewrite of planner statistics-gathering code. ANALYZE is now available as
[postgresql] / src / include / catalog / index.h
1 /*-------------------------------------------------------------------------
2  *
3  * index.h
4  *        prototypes for index.c.
5  *
6  *
7  * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
8  * Portions Copyright (c) 1994, Regents of the University of California
9  *
10  * $Id: index.h,v 1.34 2001/05/07 00:43:24 tgl Exp $
11  *
12  *-------------------------------------------------------------------------
13  */
14 #ifndef INDEX_H
15 #define INDEX_H
16
17 #include "access/itup.h"
18 #include "nodes/execnodes.h"
19
20 extern Form_pg_am AccessMethodObjectIdGetForm(Oid accessMethodObjectId,
21                                                         MemoryContext resultCxt);
22
23 extern void UpdateIndexPredicate(Oid indexoid, Node *oldPred, Node *predicate);
24
25 extern void InitIndexStrategy(int numatts,
26                                   Relation indexRelation,
27                                   Oid accessMethodObjectId);
28
29 extern void index_create(char *heapRelationName,
30                          char *indexRelationName,
31                          IndexInfo *indexInfo,
32                          Oid accessMethodObjectId,
33                          Oid *classObjectId,
34                          bool islossy,
35                          bool primary,
36                          bool allow_system_table_mods);
37
38 extern void index_drop(Oid indexId);
39
40 extern IndexInfo *BuildIndexInfo(HeapTuple indexTuple);
41
42 extern void FormIndexDatum(IndexInfo *indexInfo,
43                            HeapTuple heapTuple,
44                            TupleDesc heapDescriptor,
45                            MemoryContext resultCxt,
46                            Datum *datum,
47                            char *nullv);
48
49 extern void UpdateStats(Oid relid, double reltuples);
50 extern bool IndexesAreActive(Oid relid, bool comfirmCommitted);
51 extern void setRelhasindex(Oid relid, bool hasindex);
52
53 #ifndef OLD_FILE_NAMING
54 extern void setNewRelfilenode(Relation relation);
55
56 #endif   /* OLD_FILE_NAMING */
57 extern bool SetReindexProcessing(bool processing);
58 extern bool IsReindexProcessing(void);
59
60 extern void index_build(Relation heapRelation, Relation indexRelation,
61                         IndexInfo *indexInfo, Node *oldPred);
62
63 extern bool reindex_index(Oid indexId, bool force, bool inplace);
64 extern bool activate_indexes_of_a_table(Oid relid, bool activate);
65 extern bool reindex_relation(Oid relid, bool force);
66
67 #endif   /* INDEX_H */