50.78. pg_tables

The view pg_tables provides access to useful information about each table in the database.

Table 50-79. pg_tables Columns

NameTypeReferencesDescription
schemanamenamepg_namespace.nspnameName of schema containing table
tablenamenamepg_class.relnameName of table
tableownernamepg_authid.rolnameName of table's owner
tablespacenamepg_tablespace.spcnameName of tablespace containing table (null if default for database)
hasindexesbooleanpg_class.relhasindexTrue if table has (or recently had) any indexes
hasrulesbooleanpg_class.relhasrulesTrue if table has (or once had) rules
hastriggersbooleanpg_class.relhastriggersTrue if table has (or once had) triggers
rowsecuritybooleanpg_class.relrowsecurityTrue if row security is enabled on the table