pg_index
pg_index#
The pg_index
system catalog table contains part of the information about indexes. The rest is mostly in pg_class_internal.
Table 1. pg_catalog.pg_index
column |
type |
references |
description |
---|---|---|---|
|
oid |
pg_class.oid |
The OID of the pg_class entry for this index |
|
oid |
pg_class.oid |
The OID of the pg_class entry for the table this index is for |
|
smallint |
The number of columns in the index (duplicates pg_class.relnatts) |
|
|
smallint |
The number of key columns in the index |
|
|
boolean |
If true, this is a unique index |
|
|
boolean |
If true, this index represents the primary key of the table. ( |
|
|
boolean |
If true, this index supports an exclusion constraint |
|
|
boolean |
If true, the uniqueness check is enforced immediately on insertion (irrelevant if |
|
|
boolean |
If true, the table was last clustered on this index via the |
|
|
boolean |
If true, the index is currently valid for queries. False means the index is possibly incomplete: it must still be modified by |
|
|
boolean |
If true, queries must not use the index until the xmin of this |
|
|
boolean |
If true, the index is currently ready for inserts. False means the index must be ignored by |
|
|
boolean |
If false, the index is in process of being dropped, and should be ignored for all purposes |
|
|
boolean |
If true this index has been chosen as “replica identity” using |
|
|
int2vector |
pg_attribute.attnum |
This is an array of |
|
oidvector |
For each column in the index key, this contains the OID of the collation to use for the index. |
|
|
oidvector |
pg_opclass.oid |
For each column in the index key this contains the OID of the operator class to use |
|
int2vector |
This is an array of |
|
|
pg_node_tree |
Expression trees (in |
|
|
pg_node_tree |
Expression tree (in |