Where do COMMENTs on columns go?

Started by Nancy Ellmanover 25 years ago4 messagesgeneral
Jump to latest
#1Nancy Ellman
nan@cs.yale.edu

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.

#2Joel Burton
jburton@scw.org
In reply to: Nancy Ellman (#1)
Re: [GENERAL] Where do COMMENTs on columns go?

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)

#3Roderick A. Anderson
raanders@tincan.org
In reply to: Nancy Ellman (#1)
Re: Where do COMMENTs on columns go?

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

#4Bruce Momjian
bruce@momjian.us
In reply to: Roderick A. Anderson (#3)
Re: Where do COMMENTs on columns go?

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