Overview

The pg_index stores information about indexes on tables. It mimics the PostgreSQL system catalog pg_index.

Columns

This table is designed for compatibility with tools that require PostgreSQL system tables, so it mostly has dummy data. Please note that not all columns in pg_index are applicable to every type of relation.

The following columns are available for querying in pg_index:

ColumnTypeDescription
indexrelidintThis column represents OID of the index
indrelidintThis column represents OID (Object ID) of the table on which the index is defined
indnattsintThis column represents number of columns in the index
indnkeyattsintThis column represents number of key columns in the index
indisuniqueboolThe default value is false
indnullsnotdistinctboolunused
indisprimaryboolunused
indisexclusionboolunused
indimmediateboolunused
indisclusteredboolunused
indisvalidboolunused
indcheckxminboolunused
indisreadyboolunused
indisliveboolunused
indisreplidentboolunused
indkeyintunused
indcollationintunused
indclassintunused
indoptionintunused
indexprsintunused
indpredintunused