Help Center > > Developer Guide> System Catalogs and System Views> System Views> PG_TABLES

PG_TABLES

Updated at:Jul 15, 2020 GMT+08:00

PG_TABLES displays access to each table in the database.

Table 1 PG_TABLES columns

Name

Type

Reference

Description

schemaname

name

PG_NAMESPACE.nspname

Name of the schema that contains the table

tablename

name

PG_CLASS.relname

Name of the table

tableowner

name

pg_get_userbyid(PG_CLASS.relowner)

Owner of the table

tablespace

name

PG_TABLESPACE.spcname

Tablespace that contains the table. The default value is null

hasindexes

Boolean

PG_CLASS.relhasindex

Whether the table has (or recently had) an index. If it does, its value is true. Otherwise, its value is false.

hasrules

Boolean

PG_CLASS.relhasruls

Whether the table has rules. If it does, its value is true. Otherwise, its value is false.

hastriggers

Boolean

PG_CLASS.RELHASTRIGGERS

Whether the table has triggers. If it does, its value is true. Otherwise, its value is false.

tablecreator

name

pg_get_userbyid(PG_OBJECT.creator)

Table creator. If the creator has been deleted, no value is returned.

created

timestamp with time zone

PG_OBJECT.ctime

Time when the table was created.

last_ddl_time

timestamp with time zone

PG_OBJECT.mtime

Last time when the cluster was modified.

Did you find this page helpful?

Submit successfully!

Thank you for your feedback. Your feedback helps make our documentation better.

Failed to submit the feedback. Please try again later.

Which of the following issues have you encountered?







Please complete at least one feedback item.

Content most length 200 character

Content is empty.

OK Cancel