How do i give comment for each Field

Started by Radhaover 24 years ago3 messagesgeneral
Jump to latest
#1Radha
han_radha@yahoo.com

Hi,

I need to store some comments/definition for every field in a
table. Is there a way to give comment for the columns while creating the
table itself or after that?

I see something like 'Description' when i want to see the list of
tables/fields in the table using '\d'. Have anyone used this
'Description'?

Any help would be appreciated. Thanx in advance.

bye
Radha

#2Thalis A. Kalfigopoulos
thalis@cs.pitt.edu
In reply to: Radha (#1)
Re: How do i give comment for each Field

On Mon, 16 Jul 2001, Radha wrote:

Hi,

I need to store some comments/definition for every field in a
table. Is there a way to give comment for the columns while creating the
table itself or after that?

I see something like 'Description' when i want to see the list of
tables/fields in the table using '\d'. Have anyone used this
'Description'?

Any help would be appreciated. Thanx in advance.

You can add comments for the fields after table creation using the COMMENT command in psql. Do \h COMMENT to see the syntax.

cheers,
thalis

Show quoted text

bye
Radha

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Radha (#1)
Re: How do i give comment for each Field

Radha <han_radha@yahoo.com> writes:

I see something like 'Description' when i want to see the list of
tables/fields in the table using '\d'. Have anyone used this
'Description'?

See

http://www.ca.postgresql.org/users-lounge/docs/7.1/postgres/sql-comment.html

regards, tom lane