Fix obsolete comment regarding FSM truncation.
[PostgreSQL.git] / src / include / catalog / pg_index.h
blob9f4bd78462f36a9867a44ba04cc2dbaba1864c62
1 /*-------------------------------------------------------------------------
3 * pg_index.h
4 * definition of the system "index" relation (pg_index)
5 * along with the relation's initial contents.
8 * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
9 * Portions Copyright (c) 1994, Regents of the University of California
11 * $PostgreSQL$
13 * NOTES
14 * the genbki.sh script reads this file and generates .bki
15 * information from the DATA() statements.
17 *-------------------------------------------------------------------------
19 #ifndef PG_INDEX_H
20 #define PG_INDEX_H
22 #include "catalog/genbki.h"
24 /* ----------------
25 * pg_index definition. cpp turns this into
26 * typedef struct FormData_pg_index.
27 * ----------------
29 #define IndexRelationId 2610
31 CATALOG(pg_index,2610) BKI_WITHOUT_OIDS
33 Oid indexrelid; /* OID of the index */
34 Oid indrelid; /* OID of the relation it indexes */
35 int2 indnatts; /* number of columns in index */
36 bool indisunique; /* is this a unique index? */
37 bool indisprimary; /* is this index for primary key? */
38 bool indisclustered; /* is this the index last clustered by? */
39 bool indisvalid; /* is this index valid for use by queries? */
40 bool indcheckxmin; /* must we wait for xmin to be old? */
41 bool indisready; /* is this index ready for inserts? */
43 /* VARIABLE LENGTH FIELDS: */
44 int2vector indkey; /* column numbers of indexed cols, or 0 */
45 oidvector indclass; /* opclass identifiers */
46 int2vector indoption; /* per-column flags (AM-specific meanings) */
47 text indexprs; /* expression trees for index attributes that
48 * are not simple column references; one for
49 * each zero entry in indkey[] */
50 text indpred; /* expression tree for predicate, if a partial
51 * index; else NULL */
52 } FormData_pg_index;
54 /* ----------------
55 * Form_pg_index corresponds to a pointer to a tuple with
56 * the format of pg_index relation.
57 * ----------------
59 typedef FormData_pg_index *Form_pg_index;
61 /* ----------------
62 * compiler constants for pg_index
63 * ----------------
65 #define Natts_pg_index 14
66 #define Anum_pg_index_indexrelid 1
67 #define Anum_pg_index_indrelid 2
68 #define Anum_pg_index_indnatts 3
69 #define Anum_pg_index_indisunique 4
70 #define Anum_pg_index_indisprimary 5
71 #define Anum_pg_index_indisclustered 6
72 #define Anum_pg_index_indisvalid 7
73 #define Anum_pg_index_indcheckxmin 8
74 #define Anum_pg_index_indisready 9
75 #define Anum_pg_index_indkey 10
76 #define Anum_pg_index_indclass 11
77 #define Anum_pg_index_indoption 12
78 #define Anum_pg_index_indexprs 13
79 #define Anum_pg_index_indpred 14
82 * Index AMs that support ordered scans must support these two indoption
83 * bits. Otherwise, the content of the per-column indoption fields is
84 * open for future definition.
86 #define INDOPTION_DESC 0x0001 /* values are in reverse order */
87 #define INDOPTION_NULLS_FIRST 0x0002 /* NULLs are first instead of last */
89 #endif /* PG_INDEX_H */