1 /*-------------------------------------------------------------------------
4 * definition of the system "index" relation (pg_index)
5 * along with the relation's initial contents.
8 * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
9 * Portions Copyright (c) 1994, Regents of the University of California
11 * $Id: pg_index.h,v 1.25 2001/10/25 05:49:57 momjian 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 definintions 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 regproc indproc; /* OID of function for functional index */
39 int2vector indkey; /* column numbers of indexed attributes */
40 oidvector indclass; /* opclass identifiers */
41 bool indisclustered; /* presently unused */
42 bool indisunique; /* is this a unique index? */
43 bool indisprimary; /* is this index for primary key? */
44 Oid indreference; /* oid of index of referenced relation (ie
45 * - this index for foreign key) */
47 /* VARIABLE LENGTH FIELD: */
48 text indpred; /* expression tree for predicate, if a
53 * Form_pg_index corresponds to a pointer to a tuple with
54 * the format of pg_index relation.
57 typedef FormData_pg_index *Form_pg_index;
60 * compiler constants for pg_index
63 #define Natts_pg_index 10
64 #define Anum_pg_index_indexrelid 1
65 #define Anum_pg_index_indrelid 2
66 #define Anum_pg_index_indproc 3
67 #define Anum_pg_index_indkey 4
68 #define Anum_pg_index_indclass 5
69 #define Anum_pg_index_indisclustered 6
70 #define Anum_pg_index_indisunique 7
71 #define Anum_pg_index_indisprimary 8
72 #define Anum_pg_index_indreference 9
73 #define Anum_pg_index_indpred 10
74 #endif /* PG_INDEX_H */