Re: psql: bogus descriptions displayed by \d+

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Josh Kupershmidt <schmiddy(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: psql: bogus descriptions displayed by \d+
Date: 2011-07-22 16:44:33
Message-ID: CA+Tgmoa-Z+viO-NcaZTSYnJLCd4HTSG2VZQ6CyVjQ-zuP+1X7g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jul 21, 2011 at 9:17 PM, Josh Kupershmidt <schmiddy(at)gmail(dot)com> wrote:
> Here's a small patch against branch 8.4 to mention support for COMMENT
> ON index_name.column_name.

I am not in favor of this - because we'd also need to mention every
other relkind that can support comments. I think if we want to do
something here we should change it to say relation_name, and then
clarify what that means further down. Similarly with the patch for
master.

Also, if we're going to make a change here, we probably should make
sure it matches the actual behavior. In master, that's to allow
comments on columns of tables, views, composite types, and foreign
tables.

> Also, a patch against master to:
>  * get rid of the bogus "Description" outputs for \d+ sequence_name
> and \d+ index_name

This part looks OK, but instead of doing a negative test (not-index,
not-sequence) let's have it do a positive test, for the same types
comment.c allows.

> And while I'm messing with this, some further nitpicks about psql not
> addressed by these patches:
>  * The "Storage" column for \d+ sequence_name is correct, I suppose,
> but repetitive

I'm OK with removing that.

>  * The "Type" column for \dv+ view_name, \di+ index_name, \ds+
> sequence_name , etc. seems borderline useless.. shouldn't you know
> what type you're looking at based on the backslash command you're
> using?

Not really. You can do something like this, for example:

\dti+

...to show both indexes and tables.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2011-07-22 16:45:39 Re: Questions and experiences writing a Foreign Data Wrapper
Previous Message Tom Lane 2011-07-22 16:32:04 Re: Questions and experiences writing a Foreign Data Wrapper