Обсуждение: How do i give comment for each Field

Поиск
Список
Период
Сортировка

How do i give comment for each Field

От
Radha
Дата:

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


Re: How do i give comment for each Field

От
"Thalis A. Kalfigopoulos"
Дата:
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

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


Re: How do i give comment for each Field

От
Tom Lane
Дата:
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