0

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)

1 Answer 1

2

This can be defined using the comment statement:

comment on table drs."Reports" is 'This table stores reports';
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.