pg_indexes

A system catalogue view listing the available indexec in the current database

pg_indexes is a system catalogue view listing the available indexec in the current database.

pg_indexes was added in PostgreSQL 6.4 (commit f93b6974).

Definition by PostgreSQL version

pg_indexes (PostgreSQL 13)

            View "pg_catalog.pg_indexes"
   Column   | Type | Collation | Nullable | Default
------------+------+-----------+----------+---------
 schemaname | name |           |          |
 tablename  | name |           |          |
 indexname  | name |           |          |
 tablespace | name |           |          |
 indexdef   | text |           |          |
    

Documentation: pg_indexes

pg_indexes (PostgreSQL 12)

            View "pg_catalog.pg_indexes"
   Column   | Type | Collation | Nullable | Default
------------+------+-----------+----------+---------
 schemaname | name |           |          |
 tablename  | name |           |          |
 indexname  | name |           |          |
 tablespace | name |           |          |
 indexdef   | text |           |          |
    

Documentation: pg_indexes

pg_indexes (PostgreSQL 11)

            View "pg_catalog.pg_indexes"
   Column   | Type | Collation | Nullable | Default
------------+------+-----------+----------+---------
 schemaname | name |           |          |
 tablename  | name |           |          |
 indexname  | name |           |          |
 tablespace | name |           |          |
 indexdef   | text |           |          |
    

Documentation: pg_indexes

pg_indexes (PostgreSQL 10)

            View "pg_catalog.pg_indexes"
   Column   | Type | Collation | Nullable | Default
------------+------+-----------+----------+---------
 schemaname | name |           |          |
 tablename  | name |           |          |
 indexname  | name |           |          |
 tablespace | name |           |          |
 indexdef   | text |           |          |
    

Documentation: pg_indexes

pg_indexes (PostgreSQL 9.6)

 View "pg_catalog.pg_indexes"
   Column   | Type | Modifiers
------------+------+-----------
 schemaname | name |
 tablename  | name |
 indexname  | name |
 tablespace | name |
 indexdef   | text |
    

Documentation: pg_indexes

pg_indexes (PostgreSQL 9.5)

 View "pg_catalog.pg_indexes"
   Column   | Type | Modifiers
------------+------+-----------
 schemaname | name |
 tablename  | name |
 indexname  | name |
 tablespace | name |
 indexdef   | text |
    

Documentation: pg_indexes

pg_indexes (PostgreSQL 9.4)

 View "pg_catalog.pg_indexes"
   Column   | Type | Modifiers
------------+------+-----------
 schemaname | name |
 tablename  | name |
 indexname  | name |
 tablespace | name |
 indexdef   | text |
    

Documentation: pg_indexes

pg_indexes (PostgreSQL 9.3)

 View "pg_catalog.pg_indexes"
   Column   | Type | Modifiers
------------+------+-----------
 schemaname | name |
 tablename  | name |
 indexname  | name |
 tablespace | name |
 indexdef   | text |
    

Documentation: pg_indexes

pg_indexes (PostgreSQL 9.2)

 View "pg_catalog.pg_indexes"
   Column   | Type | Modifiers
------------+------+-----------
 schemaname | name |
 tablename  | name |
 indexname  | name |
 tablespace | name |
 indexdef   | text |
    

Documentation: pg_indexes

pg_indexes (PostgreSQL 9.1)

 View "pg_catalog.pg_indexes"
   Column   | Type | Modifiers
------------+------+-----------
 schemaname | name |
 tablename  | name |
 indexname  | name |
 tablespace | name |
 indexdef   | text |
    

Documentation: pg_indexes

pg_indexes (PostgreSQL 9.0)

 View "pg_catalog.pg_indexes"
   Column   | Type | Modifiers
------------+------+-----------
 schemaname | name |
 tablename  | name |
 indexname  | name |
 tablespace | name |
 indexdef   | text |
    

Documentation: pg_indexes

pg_indexes (PostgreSQL 8.4)

 View "pg_catalog.pg_indexes"
   Column   | Type | Modifiers
------------+------+-----------
 schemaname | name |
 tablename  | name |
 indexname  | name |
 tablespace | name |
 indexdef   | text |
View definition:
 SELECT n.nspname AS schemaname, c.relname AS tablename, i.relname AS indexname, t.spcname AS tablespace, pg_get_indexdef(i.oid) AS indexdef
   FROM pg_index x
   JOIN pg_class c ON c.oid = x.indrelid
   JOIN pg_class i ON i.oid = x.indexrelid
   LEFT JOIN pg_namespace n ON n.oid = c.relnamespace
   LEFT JOIN pg_tablespace t ON t.oid = i.reltablespace
  WHERE c.relkind = 'r'::"char" AND i.relkind = 'i'::"char";
    

Documentation: pg_indexes

pg_indexes (PostgreSQL 8.3)

 View "pg_catalog.pg_indexes"
   Column   | Type | Modifiers
------------+------+-----------
 schemaname | name |
 tablename  | name |
 indexname  | name |
 tablespace | name |
 indexdef   | text |
View definition:
 SELECT n.nspname AS schemaname, c.relname AS tablename, i.relname AS indexname, t.spcname AS tablespace, pg_get_indexdef(i.oid) AS indexdef
   FROM pg_index x
   JOIN pg_class c ON c.oid = x.indrelid
   JOIN pg_class i ON i.oid = x.indexrelid
   LEFT JOIN pg_namespace n ON n.oid = c.relnamespace
   LEFT JOIN pg_tablespace t ON t.oid = i.reltablespace
  WHERE c.relkind = 'r'::"char" AND i.relkind = 'i'::"char";
    

Documentation: pg_indexes

pg_indexes (PostgreSQL 8.2)

 View "pg_catalog.pg_indexes"
   Column   | Type | Modifiers
------------+------+-----------
 schemaname | name |
 tablename  | name |
 indexname  | name |
 tablespace | name |
 indexdef   | text |
View definition:
 SELECT n.nspname AS schemaname, c.relname AS tablename, i.relname AS indexname, t.spcname AS "tablespace", pg_get_indexdef(i.oid) AS indexdef
   FROM pg_index x
   JOIN pg_class c ON c.oid = x.indrelid
   JOIN pg_class i ON i.oid = x.indexrelid
   LEFT JOIN pg_namespace n ON n.oid = c.relnamespace
   LEFT JOIN pg_tablespace t ON t.oid = i.reltablespace
  WHERE c.relkind = 'r'::"char" AND i.relkind = 'i'::"char";
    

Documentation: pg_indexes

Change history

Categories

Indexing, System catalogue

See also

pg_index