Re: psql: bogus descriptions displayed by \d+

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

On Sun, Jul 17, 2011 at 10:54 AM, Josh Kupershmidt <schmiddy(at)gmail(dot)com> wrote:
> On Sat, Jul 16, 2011 at 12:49 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> 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.
>
> Ah, interesting. I didn't even know this functionality existed. And I
> think there is some documentation lacking; in the 8.4 doc page:

Here's a small patch against branch 8.4 to mention support for COMMENT
ON index_name.column_name.

Also, a patch against master to:
* get rid of the bogus "Description" outputs for \d+ sequence_name
and \d+ index_name
* clarify in the COMMENT ON doc page that a table _or view_ name may
be used for comments on columns, rules, and triggers. If we allowed
constraints on views, we could have just put in a note explaining that
"table_name.column_name" applies to tables and views, but constraints
are the odd man out.
* slightly reordered the listing of the first bunch of Parameters on
that page so that agg_name comes first, as it does in the Synopsis
section

I noticed that the synopsis for CREATE RULE:
http://www.postgresql.org/docs/9.1/static/sql-createrule.html

uses the term "table", which could be a similar omission. However, on
that page the first sentence of the description specifies "table or
view" so it might be fine as-is.

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
* 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? Plus the table heading could be more specific than "List of
relations", e.g. "List of views".

Josh

Attachment Content-Type Size
bogus_descriptions.v1.patch text/x-patch 7.8 KB
8.4_comment_on_indexcol.patch text/x-patch 1.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2011-07-22 01:19:49 Re: sinval synchronization considered harmful
Previous Message Robert Haas 2011-07-22 00:25:08 Re: sinval synchronization considered harmful