Updated on 2023-10-31 GMT+08:00

PG_INDEXES

PG_INDEXES displays access to useful information about each index in the database.

Table 1 PG_INDEXES columns

Name

Type

Reference

Description

schemaname

name

PG_NAMESPACE.nspname

Name of the schema that contains tables and indexes

tablename

name

PG_CLASS.relname

Name of the table for which the index serves

indexname

name

PG_CLASS.relname

Index name

tablespace

name

PG_TABLESPACE.spcname

Name of the tablespace that contains the index

indexdef

text

-

Index definition (a reconstructed CREATE INDEX command)

Example

Query the index information about a specified table.

Query information about indexes of all tables in a specified schema in the current database.