Re: proposal: psql concise mode

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

Robert Haas wrote:
> On Sun, Nov 6, 2011 at 3:29 PM, Josh Kupershmidt <schmiddy(at)gmail(dot)com> wrote:
> > On Sun, Nov 6, 2011 at 1:16 PM, Dickson S. Guedes <listas(at)guedesoft(dot)net> wrote:
> >>> test=# \d+ foo
> >>> ? ? ? ? ? ? ? ? ? ? ? ? Table "public.foo"
> >>> ?Column | ?Type ? | Storage
> >>> --------+---------+---------
> >>> ?a ? ? ?| integer | plain
> >>> ?b ? ? ?| integer | plain
> >>> Has OIDs: no
> >>
> >> Using your example, what if column 'b' has a comment and 'a' not? How
> >> the above output will be displayed?
> >
> > Then the comments would be displayed as they previously were, like so:
> >
> > ? ? ? ? ? ? ? ? ? ? ? ? Table "public.foo"
> > ?Column | ?Type ? | Storage | Description
> > --------+---------+---------+-------------
> > ?a ? ? ?| integer | plain ? |
> > ?b ? ? ?| integer | plain ? | some comment
> > Has OIDs: no
>
> I don't strongly object to this, but I wonder how useful it will
> really be in practice. It strikes me as the sort of advanced psql
> hackery that only a few people will use, and only some of those will
> gain any benefit. Empty columns don't really take up that much screen
> width, and even one value in any given column will require its
> inclusion anyway. I can also see myself turning it on and then going
> - oh, wait, is that column not there, or did it just disappear because
> I'm in concise mode?
>
> Not saying we shouldn't do it, just some food for thought.

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.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2011-11-10 21:09:12 Re: foreign key locks, 2nd attempt
Previous Message Christopher Browne 2011-11-10 20:38:41 Re: foreign key locks, 2nd attempt