Re: proposal: psql concise mode

From: "Dickson S(dot) Guedes" <listas(at)guedesoft(dot)net>
To: Josh Kupershmidt <schmiddy(at)gmail(dot)com>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: proposal: psql concise mode
Date: 2011-11-11 00:20:46
Message-ID: 4EBC6A5E.5020009@guedesoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 10-11-2011 21:42, Josh Kupershmidt wrote:
> On Thu, Nov 10, 2011 at 3:41 PM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
>> Have you tried \d+ with this psql mode:
>>
>> \pset format wrapped
>>
>> It wraps the data so it fits on the screen --- it is my default in my
>> .psqlrc.
>
> I think that's one of the many psql features I haven't experimented
> with, thanks for the suggestion. It looks OK for some things, but I
> find the column-wrapping behavior can be rather illegible, e.g.
>
> create table test (
> some_column_name serial PRIMARY KEY,
> another_column_name integer NOT NULL,
> another_col integer, username text
> );
>
> tmp=# \d+ test
> Table "public.test"
> Column | Type | Modifiers | Storage | Stats target | Description
> ----------------+---------+--------------+---------+--------------+-------------
> some_column_na.| integer | not null def.| plain | |
> .me | |.ault nextval.| | |
> | |.('test_some_.| | |
> | |.column_name_.| | |
> | |.seq'::regcla.| | |
> | |.ss) | | |
> another_column.| integer | not null | plain | |
> ._name | | | | |
> another_col | integer | | plain | |
> username | text | | extende.| |
> | | |.d | |
>
>
>
> That wrapping is pretty ugly, and the culprit is all the wasted
> horizontal space for "Stats Target" and "Description" in this case
> (and probably for many users, who never set either column modifier).
> That output might be much nicer if, instead of "Modifiers", "Column",
> and "Storage" getting squeezed, the empty "Stats Target" and
> "Description" column headers got squeezed instead, giving the
> populated columns more horizontal space.

I'm not convinced yet, because a single comment in only one column is
enough to show the "Description"'s column again.

IMHO it seems to me that the only gain of this new proposed behaviour
only happens when there is no especial information about the columns,
like comments or stat target, and I don't know if this is a common
situation.

[]s
- --
Dickson S. Guedes
mail/xmpp: guedes(at)guedesoft(dot)net - skype: guediz
http://guedesoft.net - http://www.postgresql.org.br
http://github.net/guedes - twitter: @guediz
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJOvGpeAAoJEBa5zL7BI5C7V6cH/3chliawlBO0Sf0HB2DSmHeK
AyfA+LPiKRa9Egnlt7jHIAqdiplVkfUkaP8P2L2OryexStb8eXtAWeRJjHdR11di
X15M6551vHf7fqwmCpHtNebACXDdrQefHuw9MFtPYe4jaJwy1kU7IyLQcpRjNA0s
mvPJKrH08WqdFIw0DgiZi1+EFZE2Swr/zAKbNU2snGhKA0w2juHpoBOHmlfxmXQq
Z2zWvins8nqG1lpAhhD1QZzImGpWf/W7hiXDoP2BGo9wYjU38obbVdZJHNAey75B
9C4f75vQH4MRGy/wWYEPxttLoBerQaVedfEFPyHIOoqUOpIMJeLLqbk6mY5AIDM=
=5Oez
-----END PGP SIGNATURE-----

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Thom Brown 2011-11-11 00:28:06 Re: [COMMITTERS] pgsql: Enable CHECK constraints to be declared NOT VALID
Previous Message Tomas Vondra 2011-11-11 00:12:02 proposal : backend startup hook / after logon trigger