45.68. pg_tables

Note: The following description applies both to Postgres-XC and PostgreSQL if not described explicitly.

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

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