1
/*-------------------------------------------------------------------------
4
* definition of the system "index" relation (pg_index)
5
* along with the relation's initial contents.
8
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
9
* Portions Copyright (c) 1994, Regents of the University of California
11
* $PostgreSQL: pgsql/src/include/catalog/pg_index.h,v 1.35 2004-12-31 22:03:24 pgsql Exp $
14
* the genbki.sh script reads this file and generates .bki
15
* information from the DATA() statements.
17
*-------------------------------------------------------------------------
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.
30
* pg_index definition. cpp turns this into
31
* typedef struct FormData_pg_index.
34
CATALOG(pg_index) BKI_WITHOUT_OIDS
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? */
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 */
54
* Form_pg_index corresponds to a pointer to a tuple with
55
* the format of pg_index relation.
58
typedef FormData_pg_index *Form_pg_index;
61
* compiler constants for pg_index
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
76
#endif /* PG_INDEX_H */