1996-08-28 03:59:28 +02:00
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
*
|
1999-02-14 00:22:53 +01:00
|
|
|
* pg_index.h
|
1997-09-07 07:04:48 +02:00
|
|
|
* definition of the system "index" relation (pg_index)
|
|
|
|
* along with the relation's initial contents.
|
1996-08-28 03:59:28 +02:00
|
|
|
*
|
|
|
|
*
|
2000-01-26 06:58:53 +01:00
|
|
|
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
|
|
|
|
* Portions Copyright (c) 1994, Regents of the University of California
|
1996-08-28 03:59:28 +02:00
|
|
|
*
|
2000-01-26 06:58:53 +01:00
|
|
|
* $Id: pg_index.h,v 1.15 2000/01/26 05:57:57 momjian Exp $
|
1996-08-28 03:59:28 +02:00
|
|
|
*
|
|
|
|
* NOTES
|
1997-09-07 07:04:48 +02:00
|
|
|
* the genbki.sh script reads this file and generates .bki
|
|
|
|
* information from the DATA() statements.
|
1996-08-28 03:59:28 +02:00
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
#ifndef PG_INDEX_H
|
|
|
|
#define PG_INDEX_H
|
|
|
|
|
|
|
|
/* ----------------
|
1997-09-07 07:04:48 +02:00
|
|
|
* postgres.h contains the system type definintions and the
|
|
|
|
* CATALOG(), BOOTSTRAP and DATA() sugar words so this file
|
|
|
|
* can be read by both genbki.sh and the C compiler.
|
1996-08-28 03:59:28 +02:00
|
|
|
* ----------------
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* ----------------
|
1997-09-07 07:04:48 +02:00
|
|
|
* pg_index definition. cpp turns this into
|
|
|
|
* typedef struct FormData_pg_index. The oid of the index relation
|
|
|
|
* is stored in indexrelid; the oid of the indexed relation is stored
|
|
|
|
* in indrelid.
|
1996-08-28 03:59:28 +02:00
|
|
|
* ----------------
|
1997-09-07 07:04:48 +02:00
|
|
|
*/
|
1996-11-13 21:56:15 +01:00
|
|
|
|
1997-09-07 07:04:48 +02:00
|
|
|
/*
|
1996-11-13 21:56:15 +01:00
|
|
|
* it seems that all variable length fields should go at the _end_,
|
|
|
|
* because the system cache routines only copy the fields up to the
|
|
|
|
* first variable length field. so I moved indislossy, indhaskeytype,
|
1997-09-07 07:04:48 +02:00
|
|
|
* and indisunique before indpred. --djm 8/20/96
|
1996-11-13 21:56:15 +01:00
|
|
|
*/
|
1997-09-07 07:04:48 +02:00
|
|
|
CATALOG(pg_index)
|
|
|
|
{
|
1997-09-08 04:41:22 +02:00
|
|
|
Oid indexrelid;
|
|
|
|
Oid indrelid;
|
|
|
|
Oid indproc; /* registered procedure for functional
|
1997-09-07 07:04:48 +02:00
|
|
|
* index */
|
2000-01-10 17:13:23 +01:00
|
|
|
int2vector indkey;
|
|
|
|
oidvector indclass;
|
1997-09-08 04:41:22 +02:00
|
|
|
bool indisclustered;
|
|
|
|
bool indislossy; /* do we fetch false tuples (lossy
|
1997-09-07 07:04:48 +02:00
|
|
|
* compression)? */
|
1997-09-08 04:41:22 +02:00
|
|
|
bool indhaskeytype; /* does key type != attribute type? */
|
|
|
|
bool indisunique; /* is this a unique index? */
|
1998-09-10 17:32:32 +02:00
|
|
|
bool indisprimary; /* is this index for primary key */
|
1999-05-25 18:15:34 +02:00
|
|
|
Oid indreference; /* oid of index of referenced relation (ie
|
|
|
|
* - this index for foreign key */
|
1997-09-08 04:41:22 +02:00
|
|
|
text indpred; /* query plan for partial index predicate */
|
1996-08-28 03:59:28 +02:00
|
|
|
} FormData_pg_index;
|
|
|
|
|
|
|
|
/* ----------------
|
1997-09-07 07:04:48 +02:00
|
|
|
* Form_pg_index corresponds to a pointer to a tuple with
|
|
|
|
* the format of pg_index relation.
|
1996-08-28 03:59:28 +02:00
|
|
|
* ----------------
|
|
|
|
*/
|
1998-09-01 05:29:17 +02:00
|
|
|
typedef FormData_pg_index *Form_pg_index;
|
1996-08-28 03:59:28 +02:00
|
|
|
|
|
|
|
/* ----------------
|
1997-09-07 07:04:48 +02:00
|
|
|
* compiler constants for pg_index
|
1996-08-28 03:59:28 +02:00
|
|
|
* ----------------
|
|
|
|
*/
|
1998-09-10 17:32:32 +02:00
|
|
|
#define Natts_pg_index 12
|
1997-09-07 07:04:48 +02:00
|
|
|
#define Anum_pg_index_indexrelid 1
|
|
|
|
#define Anum_pg_index_indrelid 2
|
|
|
|
#define Anum_pg_index_indproc 3
|
|
|
|
#define Anum_pg_index_indkey 4
|
|
|
|
#define Anum_pg_index_indclass 5
|
1996-08-28 03:59:28 +02:00
|
|
|
#define Anum_pg_index_indisclustered 6
|
1997-11-21 19:12:58 +01:00
|
|
|
#define Anum_pg_index_indislossy 7
|
|
|
|
#define Anum_pg_index_indhaskeytype 8
|
1998-09-06 06:49:51 +02:00
|
|
|
#define Anum_pg_index_indisunique 9
|
1998-09-10 17:32:32 +02:00
|
|
|
#define Anum_pg_index_indisprimary 10
|
|
|
|
#define Anum_pg_index_indreference 11
|
|
|
|
#define Anum_pg_index_indpred 12
|
1996-08-28 03:59:28 +02:00
|
|
|
|
1998-09-01 06:40:42 +02:00
|
|
|
#endif /* PG_INDEX_H */
|