select open change scope Open full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

SYSTEM CATALOGS / SYSTEM VIEWS

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

Kind
System views
Columns in this snapshot
8
Definition source
English manual

Columns 8

ColumnTypeDescription / reference
schemanamenameName of schema containing table
pg_namespace.nspname
tablenamenameName of table
pg_class.relname
tableownernameName of table's owner
pg_authid.rolname
tablespacenameName of tablespace containing table (null if default for database)
pg_tablespace.spcname
hasindexesboolTrue if table has (or recently had) any indexes
pg_class.relhasindex
hasrulesboolTrue if table has (or once had) rules
pg_class.relhasrules
hastriggersboolTrue if table has (or once had) triggers
pg_class.relhastriggers
rowsecurityboolTrue if row security is enabled on the table
pg_class.relrowsecurity
Column history across versions
Version history 1
  1. PG 9.4 → 9.5changed

Definition snapshot: english-manuals:db1123581b44b836a4b07ede225… · English manual source