Re: [GENERAL] Where do COMMENTs on columns go?

Lists: pgsql-generalpgsql-interfaces
From: Nancy Ellman <nan(at)cs(dot)yale(dot)edu>
To: pgsql-general(at)postgresql(dot)org
Subject: Where do COMMENTs on columns go?
Date: 2000-12-04 19:17:25
Message-ID: Pine.LNX.4.21.0012041358220.24374-100000@pine.cs.yale.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general pgsql-interfaces

According to the documentation for COMMENT, it puts a comment on
object "that can be easily retrieved with psql's \dd command."

Examples like

COMMENT on table mytable is 'foo';
COMMENT on column mytable.mycolumn is 'bar';

are given.

However, while I have been able to see the results of the first
example with

\dd mytable

I have not been able to get \dd to show the comments on the
individual columns.

Can someone tell me how to do that?

I am running postgresql-7.0.2.

Thanks,

Nan Ellman

PS Please email any replies to me directly.


From: "Joel Burton" <jburton(at)scw(dot)org>
To: Nancy Ellman <nan(at)cs(dot)yale(dot)edu>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: [GENERAL] Where do COMMENTs on columns go?
Date: 2000-12-04 22:02:03
Message-ID: 3A2BCE0B.14212.1760723@localhost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general pgsql-interfaces

> COMMENT on table mytable is 'foo';
> COMMENT on column mytable.mycolumn is 'bar';

> I have not been able to get \dd to show the comments on the
> individual columns.

\d+ <tablename>

In general, the "+" shows the comments.

You need a semi-recent version of psql to do this, something like
7.0 or better.

--
Joel Burton, Director of Information Systems -*- jburton(at)scw(dot)org
Support Center of Washington (www.scw.org)


From: "Roderick A(dot) Anderson" <raanders(at)tincan(dot)org>
To: Nancy Ellman <nan(at)cs(dot)yale(dot)edu>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Where do COMMENTs on columns go?
Date: 2000-12-04 22:34:55
Message-ID: Pine.LNX.4.10.10012041434040.11527-100000@tincan.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general pgsql-interfaces

On Mon, 4 Dec 2000, Nancy Ellman wrote:

> However, while I have been able to see the results of the first
> example with
>
> \dd mytable

Try \d+ mytable

Rod


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: "Roderick A(dot) Anderson" <raanders(at)tincan(dot)org>
Cc: Nancy Ellman <nan(at)cs(dot)yale(dot)edu>, pgsql-general(at)postgresql(dot)org
Subject: Re: Where do COMMENTs on columns go?
Date: 2000-12-10 21:56:47
Message-ID: 200012102156.QAA05846@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general pgsql-interfaces

> On Mon, 4 Dec 2000, Nancy Ellman wrote:
>
> > However, while I have been able to see the results of the first
> > example with
> >
> > \dd mytable
>
> Try \d+ mytable

I have added a mention of \d+ to the comment manual page. I realize \dd
and \d+ are kind of confusing bcause one shows table name comment and
the other column comments. Other backslash commands have similar +
options.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026