Summary
The view pg_indexes provides access to useful information about each index in the database.
(Description quoted from the official PostgreSQL documentation.)
Columns
The pg_indexes system view exposes the following columns (names, types and descriptions are taken verbatim from the PostgreSQL documentation):
schemanamenamereferencespg_namespace.nspname
Name of schema containing table and indextablenamenamereferencespg_class.relname
Name of table the index is forindexnamenamereferencespg_class.relname
Name of indextablespacenamereferencespg_tablespace.spcname
Name of tablespace containing index (null if default for database)indexdeftext
Index definition (a reconstructed createindex command)
Related catalogs
This object references the following other system catalogs:
schemaname→pg_namespacetablename→pg_classtablespace→pg_tablespace
Version applicability
Present in PostgreSQL 17, 18, 19 (verified against each release’s documentation). This is a long-standing system object that also exists in earlier PostgreSQL releases.
Related & references
Reference: PostgreSQL documentation — pg_indexes.