~vcs-imports/mammoth-replicator/trunk

« back to all changes in this revision

Viewing changes to src/include/catalog/pg_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
 * pg_index.h
 
4
 *        definition of the system "index" relation (pg_index)
 
5
 *        along with the relation's initial contents.
 
6
 *
 
7
 *
 
8
 * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
 
9
 * Portions Copyright (c) 1994, Regents of the University of California
 
10
 *
 
11
 * $PostgreSQL: pgsql/src/include/catalog/pg_index.h,v 1.35 2004-12-31 22:03:24 pgsql Exp $
 
12
 *
 
13
 * NOTES
 
14
 *        the genbki.sh script reads this file and generates .bki
 
15
 *        information from the DATA() statements.
 
16
 *
 
17
 *-------------------------------------------------------------------------
 
18
 */
 
19
#ifndef PG_INDEX_H
 
20
#define PG_INDEX_H
 
21
 
 
22
/* ----------------
 
23
 *              postgres.h contains the system type definitions and the
 
24
 *              CATALOG(), BOOTSTRAP and DATA() sugar words so this file
 
25
 *              can be read by both genbki.sh and the C compiler.
 
26
 * ----------------
 
27
 */
 
28
 
 
29
/* ----------------
 
30
 *              pg_index definition.  cpp turns this into
 
31
 *              typedef struct FormData_pg_index.
 
32
 * ----------------
 
33
 */
 
34
CATALOG(pg_index) BKI_WITHOUT_OIDS
 
35
{
 
36
        Oid                     indexrelid;             /* OID of the index */
 
37
        Oid                     indrelid;               /* OID of the relation it indexes */
 
38
        int2vector      indkey;                 /* column numbers of indexed cols, or 0 */
 
39
        oidvector       indclass;               /* opclass identifiers */
 
40
        int2            indnatts;               /* number of columns in index */
 
41
        bool            indisunique;    /* is this a unique index? */
 
42
        bool            indisprimary;   /* is this index for primary key? */
 
43
        bool            indisclustered; /* is this the index last clustered by? */
 
44
 
 
45
        /* VARIABLE LENGTH FIELDS: */
 
46
        text            indexprs;               /* expression trees for index attributes
 
47
                                                                 * that are not simple column references;
 
48
                                                                 * one for each zero entry in indkey[] */
 
49
        text            indpred;                /* expression tree for predicate, if a
 
50
                                                                 * partial index; else NULL */
 
51
} FormData_pg_index;
 
52
 
 
53
/* ----------------
 
54
 *              Form_pg_index corresponds to a pointer to a tuple with
 
55
 *              the format of pg_index relation.
 
56
 * ----------------
 
57
 */
 
58
typedef FormData_pg_index *Form_pg_index;
 
59
 
 
60
/* ----------------
 
61
 *              compiler constants for pg_index
 
62
 * ----------------
 
63
 */
 
64
#define Natts_pg_index                                  10
 
65
#define Anum_pg_index_indexrelid                1
 
66
#define Anum_pg_index_indrelid                  2
 
67
#define Anum_pg_index_indkey                    3
 
68
#define Anum_pg_index_indclass                  4
 
69
#define Anum_pg_index_indnatts                  5
 
70
#define Anum_pg_index_indisunique               6
 
71
#define Anum_pg_index_indisprimary              7
 
72
#define Anum_pg_index_indisclustered    8
 
73
#define Anum_pg_index_indexprs                  9
 
74
#define Anum_pg_index_indpred                   10
 
75
 
 
76
#endif   /* PG_INDEX_H */