PG_INDEX
PG_INDEX records part of index information. The rest is mostly recorded in PG_CLASS.
Name |
Type |
Description |
---|---|---|
indexrelid |
oid |
OID of the PG_CLASS entry for this index |
indrelid |
oid |
OID of the PG_CLASS entry for the table that uses this index |
indnatts |
smallint |
Number of columns in the index |
indisunique |
boolean |
|
indisprimary |
boolean |
|
indisexclusion |
boolean |
|
indimmediate |
boolean |
|
indisclustered |
boolean |
|
indisusable |
boolean |
|
indisvalid |
boolean |
This index is valid for queries if the value is true. If the value is false, the index is possibly incomplete and must still be modified by INSERT/UPDATE operations, but it cannot safely be used for queries. If it is a unique index, the uniqueness property is also not true. |
indcheckxmin |
boolean |
|
indisready |
boolean |
The index is available for inserted data if the value is true. Otherwise, this index is ignored when data is inserted or modified. |
indkey |
int2vector |
This is an array of indnatts values indicating that this index creates table columns. For example, a value of 1 3 indicates that the first and the third columns make up the index key. The value 0 in this array indicates that the corresponding index attribute is an expression over the table columns, rather than a simple column reference. |
indcollation |
oidvector |
OID of the collation corresponding to each index column. For details, see the description of pg_collation. |
indclass |
oidvector |
For each column in the index key, this contains the OID of the operator class to use. See PG_OPCLASS for details. |
indoption |
int2vector |
Array of values that store per-column flag bits. The meaning of the bits is defined by the index's access method. |
indexprs |
pg_node_tree |
Expression trees (in nodeToString() representation) for index attributes that are not simple column references. It is a list with one element for each zero entry in INDKEY. The value is NULL if all index attributes are simple references. |
indpred |
pg_node_tree |
Expression tree (in nodeToString() representation) for partial index predicate. If the index is not a partial index, this column is an empty string. |
indisreplident |
boolean |
|
indnkeyatts |
smallint |
Total number of columns in the index. The columns that exceed the value of indnatts are not involved in the index query. |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot