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

From Josh Kupershmidt
Subject Re: psql: bogus descriptions displayed by \d+
Date
Msg-id CAK3UJRGg=DGrTVoxT1EfLoKgjzSC_whyGu+rMnJJVb7pMw9G1Q@mail.gmail.com
Whole thread Raw
In response to Re: psql: bogus descriptions displayed by \d+  (Josh Kupershmidt <schmiddy@gmail.com>)
Responses Re: psql: bogus descriptions displayed by \d+
List pgsql-hackers
On Sun, Jul 17, 2011 at 10:54 AM, Josh Kupershmidt <schmiddy@gmail.com> wrote:
> On Sat, Jul 16, 2011 at 12:49 PM, Tom Lane <tgl@sss.pgh.pa.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

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: sinval synchronization considered harmful
Next
From: Tom Lane
Date:
Subject: Re: sinval synchronization considered harmful