Re: psql: display of object comments

From: Josh Kupershmidt <schmiddy(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: psql: display of object comments
Date: 2011-08-05 02:24:00
Message-ID: CAK3UJRH2ojHt4EmeJLHuD5CwOgz1miTvRY1EDRVu81PfFnLy5g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Aug 4, 2011 at 12:26 PM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Tue, Jul 26, 2011 at 8:38 PM, Josh Kupershmidt <schmiddy(at)gmail(dot)com> wrote:
>> [new patch]
>
> I've committed the portion of this that displays comments on languages
> and casts.

Thanks!

> For domains and conversions, I am wondering if we should display the
> comments only when + is specified, since the output is fairly wide
> already.

I wasn't sure whether there was some sort of precedent for whether
comments should be displayed only in verbose mode, but looking through
the existing backslash commands, it seems reasonable to make it
verbose-only if the output is already pushing 80 characters for
typical usage (object names and other column outputs of lengths
typically encountered).

A few existing backslash commands, such as \dn and maybe \db, don't
exactly follow this precedent. Not sure if we want to bother adjusting
the existing commands to be consistent in this regard. Defining
"typical usage" is pretty wishy-washy, so I'm not real inclined to try
messing with the existing commands.

> For foreign data wrappers, foreign servers, and foreign tables, I am
> wondering if there is any particular rule we should adhere to in terms
> of where the description shows up in the output column list.  It
> doesn't seem entirely consistent the way you've done it here, but
> maybe you've put more thought into it than I have.

Hrm, what wasn't consistent? I intended to just put the "Description"
column at the end of the outputs for \dew, \des, and \det, which seems
to be the way other commands handle this. Though now that I double
check, I notice that the verbose modes of these commands include extra
columns which come after "Description", and it might be better to
force "Description" to stay at the end in those cases, the way that
\dT[+] and \dFt[+] do. Though perhaps you're complaining about
something different -- \dL isn't forcing "Description" to the end in
verbose mode.

Josh

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2011-08-05 03:22:05 Re: PQescapeByteaConn - returns wrong string for PG9.1 Beta3
Previous Message Andrew Dunstan 2011-08-05 01:40:57 Re: plperl crash with Debian 6 (64 bit), pl/perlu, libwww and https