Thread: comments on columns aren't displayed by \dd

comments on columns aren't displayed by \dd

From
pgsql-bugs@postgresql.org
Date:
Stephen van Egmond (svanegmond@home.com) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
comments on columns aren't displayed by \dd

Long Description
Comments on columns appear to be broken.  CREATE COMMENT ON COLUMN inserts stuff into the backend pg_* tables
correctly. However \dd from the psql interactive monitor doesn't send a query to retrieve it (i.e. no join on
pg_attribute).

I am working from the Debian package postgresql-client 7.0.3-2.

Sample Code
create table foo (a text);
cmment on column foo.a is 'hello!';
\dd foo.a

No file was uploaded with this report

Re: comments on columns aren't displayed by \dd

From
Bruce Momjian
Date:
Psql manual pages says:

              The command form \d+ is identical, but any comments
              associated  with  the  table  columns  are shown as
              well.

> Stephen van Egmond (svanegmond@home.com) reports a bug with a severity of 3
> The lower the number the more severe it is.
>
> Short Description
> comments on columns aren't displayed by \dd
>
> Long Description
> Comments on columns appear to be broken.  CREATE COMMENT ON COLUMN inserts stuff into the backend pg_* tables
correctly. However \dd from the psql interactive monitor doesn't send a query to retrieve it (i.e. no join on
pg_attribute).
>
> I am working from the Debian package postgresql-client 7.0.3-2.
>
> Sample Code
> create table foo (a text);
> cmment on column foo.a is 'hello!';
> \dd foo.a
>
> No file was uploaded with this report
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>


--
  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

Re: comments on columns aren't displayed by \dd

From
Bruce Momjian
Date:
> Bruce Momjian (pgman@candle.pha.pa.us) wrote:
> > Psql manual pages says:
> >
> >               The command form \d+ is identical, but any comments
> >               associated  with  the  table  columns  are shown as
> >               well.
>
> Thank you for the response, Bruce.  I was working from the HTML docs
> for COMMENT ON  [1] where only \dd is mentioned.  \d+ doesn't occur in the
> \? psql help either.
>
> -Steve
>  [1] http://www.postgresql.org/users-lounge/docs/7.0/postgres/sql-comment.htm

The + options to psql are sort of COMMENT additions to the backslash
commands.

--
  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

Re: comments on columns aren't displayed by \dd

From
Stephen van Egmond
Date:
Bruce Momjian (pgman@candle.pha.pa.us) wrote:
> Psql manual pages says:
>
>               The command form \d+ is identical, but any comments
>               associated  with  the  table  columns  are shown as
>               well.

Thank you for the response, Bruce.  I was working from the HTML docs
for COMMENT ON  [1] where only \dd is mentioned.  \d+ doesn't occur in the
\? psql help either.

-Steve
 [1] http://www.postgresql.org/users-lounge/docs/7.0/postgres/sql-comment.htm