Where do COMMENTs on columns go?
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.
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@scw.org
Support Center of Washington (www.scw.org)
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
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@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026