pg_tables

45.65. pg_tables

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

Table 45-66. 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

Back to top

(С) Виктор Вислобоков, 2008-2023