Re: psql: bogus descriptions displayed by \d+ - Mailing list pgsql-hackers

From Tom Lane
Subject Re: psql: bogus descriptions displayed by \d+
Date
Msg-id 27558.1310832593@sss.pgh.pa.us
Whole thread Raw
In response to psql: bogus descriptions displayed by \d+  (Josh Kupershmidt <schmiddy@gmail.com>)
Responses Re: psql: bogus descriptions displayed by \d+
List pgsql-hackers
Josh Kupershmidt <schmiddy@gmail.com> writes:
> So, if you look at \d+ newtbl, the right-most column named Description
> should display any comments attached to newtbl's columns. You should
> see "bcol column comment" as the Description for column bcol. That
> works OK.

Right.

> Now, try this:

> test=# \d+ newtbl_idx_bcol
>             Index "public.newtbl_idx_bcol"
>  Column |  Type   | Definition | Storage | Description
> --------+---------+------------+---------+-------------
>  bcol   | integer | bcol       | plain   |

> What's the Description displayed in that table?

What it ought to be is the comment (if any) attached to the index's
column.  Up through 8.4 this worked as expected, but in 9.0 and up
somebody seems to have disallowed comments on index columns.  Not
sure how carefully that was thought through.

> A similar situation exists for sequences and views displayed by \d+.

Again, the ability to stick comments on columns of those relkinds
seems to have been shut off as of 9.0.  In 8.4 all of these description
columns are functional.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Josh Kupershmidt
Date:
Subject: psql: bogus descriptions displayed by \d+
Next
From: Tom Lane
Date:
Subject: Re: psql: bogus descriptions displayed by \d+