Re: psql: bogus descriptions displayed by \d+

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Josh Kupershmidt <schmiddy(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: psql: bogus descriptions displayed by \d+
Date: 2011-07-16 16:49:30
Message-ID: 29149.1310834970@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I wrote:
> Josh Kupershmidt <schmiddy(at)gmail(dot)com> writes:
>> 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.

After a bit of review of the archives, the somebody was me:
http://git.postgresql.org/gitweb/?p=postgresql.git&a=commitdiff&h=b7d67954456f15762c04e5269b64adc88dcd0860

and this thread was the discussion about it:
http://archives.postgresql.org/pgsql-hackers/2009-12/msg01982.php

It looks like we thought about pg_dump, but did not think about psql.

I think it might be reasonable to remove the Description column from
\d+ output for indexes and sequences, on the grounds that (1) it's
useless against 9.x servers, and (2) for those relkinds we add other
columns and so the horizontal space is precious.

We could also consider showing Description only when talking to a
pre-9.0 server; but that's going to render the code even more
spaghetti-ish, and the value seems pretty limited.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Grittner 2011-07-16 17:10:25 Re: isolation test deadlocking on buildfarm member coypu
Previous Message Tom Lane 2011-07-16 16:09:53 Re: psql: bogus descriptions displayed by \d+