~vcs-imports/mammoth-replicator/trunk

« back to all changes in this revision

Viewing changes to src/include/catalog/index.h

  • Committer: alvherre
  • Date: 2005-12-16 21:24:52 UTC
  • Revision ID: svn-v4:db760fc0-0f08-0410-9d63-cc6633f64896:trunk:1
Initial import of the REL8_0_3 sources from the Pgsql CVS repository.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*-------------------------------------------------------------------------
 
2
 *
 
3
 * index.h
 
4
 *        prototypes for index.c.
 
5
 *
 
6
 *
 
7
 * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
 
8
 * Portions Copyright (c) 1994, Regents of the University of California
 
9
 *
 
10
 * $PostgreSQL: pgsql/src/include/catalog/index.h,v 1.59 2004-12-31 22:03:24 pgsql Exp $
 
11
 *
 
12
 *-------------------------------------------------------------------------
 
13
 */
 
14
#ifndef INDEX_H
 
15
#define INDEX_H
 
16
 
 
17
#include "access/itup.h"
 
18
#include "catalog/pg_index.h"
 
19
#include "nodes/execnodes.h"
 
20
 
 
21
 
 
22
#define DEFAULT_INDEX_TYPE      "btree"
 
23
 
 
24
/* Typedef for callback function for IndexBuildHeapScan */
 
25
typedef void (*IndexBuildCallback) (Relation index,
 
26
                                                                                                HeapTuple htup,
 
27
                                                                                                Datum *attdata,
 
28
                                                                                                char *nulls,
 
29
                                                                                                bool tupleIsAlive,
 
30
                                                                                                void *state);
 
31
 
 
32
 
 
33
extern Oid index_create(Oid heapRelationId,
 
34
                         const char *indexRelationName,
 
35
                         IndexInfo *indexInfo,
 
36
                         Oid accessMethodObjectId,
 
37
                         Oid tableSpaceId,
 
38
                         Oid *classObjectId,
 
39
                         bool primary,
 
40
                         bool isconstraint,
 
41
                         bool allow_system_table_mods,
 
42
                         bool skip_build);
 
43
 
 
44
extern void index_drop(Oid indexId);
 
45
 
 
46
extern IndexInfo *BuildIndexInfo(Relation index);
 
47
 
 
48
extern void FormIndexDatum(IndexInfo *indexInfo,
 
49
                           HeapTuple heapTuple,
 
50
                           TupleDesc heapDescriptor,
 
51
                           EState *estate,
 
52
                           Datum *datum,
 
53
                           char *nullv);
 
54
 
 
55
extern void UpdateStats(Oid relid, double reltuples);
 
56
 
 
57
extern void setRelhasindex(Oid relid, bool hasindex,
 
58
                           bool isprimary, Oid reltoastidxid);
 
59
 
 
60
extern void setNewRelfilenode(Relation relation);
 
61
 
 
62
extern void index_build(Relation heapRelation, Relation indexRelation,
 
63
                        IndexInfo *indexInfo);
 
64
 
 
65
extern double IndexBuildHeapScan(Relation heapRelation,
 
66
                                   Relation indexRelation,
 
67
                                   IndexInfo *indexInfo,
 
68
                                   IndexBuildCallback callback,
 
69
                                   void *callback_state);
 
70
 
 
71
extern void reindex_index(Oid indexId);
 
72
extern bool reindex_relation(Oid relid, bool toast_too);
 
73
 
 
74
#endif   /* INDEX_H */