47.72. pg_tables

Note: The following description applies both to Postgres-XC and PostgreSQL if not described explicitly. You can read PostgreSQL as Postgres-XC except for version number, which is specific to each product.

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

Table 47-73. 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