PostgreSQL Source Code  git master
pg_index.h File Reference
#include "catalog/genbki.h"
#include "catalog/pg_index_d.h"
Include dependency graph for pg_index.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define IndexIndrelidIndexId   2678
 
#define IndexRelidIndexId   2679
 

Typedefs

typedef FormData_pg_indexForm_pg_index
 

Functions

 CATALOG (pg_index, 2610, IndexRelationId) BKI_SCHEMA_MACRO
 
 DECLARE_INDEX (pg_index_indrelid_index, 2678, on pg_index using btree(indrelid oid_ops))
 
 DECLARE_UNIQUE_INDEX_PKEY (pg_index_indexrelid_index, 2679, on pg_index using btree(indexrelid oid_ops))
 
 DECLARE_ARRAY_FOREIGN_KEY_OPT ((indrelid, indkey), pg_attribute,(attrelid, attnum))
 

Variables

 FormData_pg_index
 

Macro Definition Documentation

◆ IndexIndrelidIndexId

#define IndexIndrelidIndexId   2678

Definition at line 72 of file pg_index.h.

Referenced by get_pkey_attnames(), and RelationGetIndexList().

◆ IndexRelidIndexId

#define IndexRelidIndexId   2679

Definition at line 74 of file pg_index.h.

Referenced by RelationCacheInitializePhase3(), and sepgsql_index_modify().

Typedef Documentation

◆ Form_pg_index

Definition at line 69 of file pg_index.h.

Function Documentation

◆ CATALOG()

CATALOG ( pg_index  ,
2610  ,
IndexRelationId   
)

Definition at line 29 of file pg_index.h.

References BKI_FORCE_NOT_NULL, BKI_LOOKUP, and BKI_LOOKUP_OPT.

30 {
31  Oid indexrelid BKI_LOOKUP(pg_class); /* OID of the index */
32  Oid indrelid BKI_LOOKUP(pg_class); /* OID of the relation it
33  * indexes */
34  int16 indnatts; /* total number of columns in index */
35  int16 indnkeyatts; /* number of key columns in index */
36  bool indisunique; /* is this a unique index? */
37  bool indisprimary; /* is this index for primary key? */
38  bool indisexclusion; /* is this index for exclusion constraint? */
39  bool indimmediate; /* is uniqueness enforced immediately? */
40  bool indisclustered; /* is this the index last clustered by? */
41  bool indisvalid; /* is this index valid for use by queries? */
42  bool indcheckxmin; /* must we wait for xmin to be old? */
43  bool indisready; /* is this index ready for inserts? */
44  bool indislive; /* is this index alive at all? */
45  bool indisreplident; /* is this index the identity for replication? */
46 
47  /* variable-length fields start here, but we allow direct access to indkey */
48  int2vector indkey BKI_FORCE_NOT_NULL; /* column numbers of indexed cols,
49  * or 0 */
50 
51 #ifdef CATALOG_VARLEN
52  oidvector indcollation BKI_LOOKUP_OPT(pg_collation) BKI_FORCE_NOT_NULL; /* collation identifiers */
53  oidvector indclass BKI_LOOKUP(pg_opclass) BKI_FORCE_NOT_NULL; /* opclass identifiers */
54  int2vector indoption BKI_FORCE_NOT_NULL; /* per-column flags
55  * (AM-specific meanings) */
56  pg_node_tree indexprs; /* expression trees for index attributes that
57  * are not simple column references; one for
58  * each zero entry in indkey[] */
59  pg_node_tree indpred; /* expression tree for predicate, if a partial
60  * index; else NULL */
61 #endif
FormData_pg_index
Definition: pg_index.h:62
signed short int16
Definition: c.h:428
Definition: c.h:660
unsigned int Oid
Definition: postgres_ext.h:31
#define BKI_FORCE_NOT_NULL
Definition: genbki.h:33
#define BKI_LOOKUP_OPT(catalog)
Definition: genbki.h:47
#define BKI_LOOKUP(catalog)
Definition: genbki.h:46
Definition: c.h:649

◆ DECLARE_ARRAY_FOREIGN_KEY_OPT()

DECLARE_ARRAY_FOREIGN_KEY_OPT ( (indrelid, indkey)  ,
pg_attribute  ,
(attrelid, attnum  
)

◆ DECLARE_INDEX()

DECLARE_INDEX ( pg_index_indrelid_index  ,
2678  ,
on pg_index using   btreeindrelid oid_ops 
)

◆ DECLARE_UNIQUE_INDEX_PKEY()

DECLARE_UNIQUE_INDEX_PKEY ( pg_index_indexrelid_index  ,
2679  ,
on pg_index using   btreeindexrelid oid_ops 
)

Variable Documentation

◆ FormData_pg_index

FormData_pg_index

Definition at line 62 of file pg_index.h.