Updated on 2025-06-12 GMT+08:00

PG_DESCRIPTION

PG_DESCRIPTION records optional descriptions (comments) for each database object. Descriptions of many built-in system objects are provided in the initial contents of PG_DESCRIPTION.

See also PG_SHDESCRIPTION, which performs a similar function for descriptions involving objects that are shared across a database cluster.

Table 1 PG_DESCRIPTION columns

Column

Type

Reference

Description

objoid

oid

Any OID column

OID of the object to which the description belongs.

classoid

oid

PG_CLASSoid

OID of the system catalog displayed for the object.

objsubid

integer

-

For a comment on a table column, the value is the column number (objoid and classoid refer to the table). For other object types, the value is 0.

description

text

-

Arbitrary text of the object description.