pg_matviews

The view pg_matviews provides access to useful information about each materialized view in the database.

columntypereferencesdescription
schemanamenamepg_namespace.nspnameName of the schema containing the materialized view
matviewnamenamepg_class.relnameName of the materialized view
matviewownernamepg_authid.rolnameName of the materialized view’s owner
tablespacenamepg_tablespace.spcnameName of the tablespace containing the materialized view (NULL if default for the database)
hasindexesbooleanTrue if the materialized view has (or recently had) any indexes
ispopulatedbooleanTrue if the materialized view is currently populated
definitiontextMaterialized view definition (a reconstructed SELECT command)