rho
rho

Reputation: 807

Using postgres table description

In postgres while listing the relation with \dt+ new columns 'size' and 'Description' column are added. As the name suggests Description can we use to store the description of the table, if yes how?

# \dt
        List of relations
 Schema |  Name   | Type  | Owner 
--------+---------+-------+-------
 drs    | Records | table | rho
 drs    | Reports | table | rho
(2 rows)

# \dt+
                      List of relations
 Schema |  Name   | Type  | Owner |    Size    | Description 
--------+---------+-------+-------+------------+-------------
 drs    | Records | table | rho   | 8192 bytes | 
 drs    | Reports | table | rho   | 0 bytes    | 
(2 rows)

Upvotes: 0

Views: 194

Answers (1)

user330315
user330315

Reputation:

This can be defined using the comment statement:

comment on table drs."Reports" is 'This table stores reports';

Upvotes: 2

Related Questions