Re: psql: display of object comments - Mailing list pgsql-hackers

From Josh Kupershmidt
Subject Re: psql: display of object comments
Date
Msg-id CAK3UJRH2ojHt4EmeJLHuD5CwOgz1miTvRY1EDRVu81PfFnLy5g@mail.gmail.com
Whole thread Raw
In response to Re: psql: display of object comments  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: psql: display of object comments
List pgsql-hackers
On Thu, Aug 4, 2011 at 12:26 PM, Robert Haas <robertmhaas@gmail.com> wrote:
> On Tue, Jul 26, 2011 at 8:38 PM, Josh Kupershmidt <schmiddy@gmail.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


pgsql-hackers by date:

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