Re: \du quite ugly in 8.4

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: \du quite ugly in 8.4
Date: 2009-10-31 10:30:56
Message-ID: 1256985056.28195.9.camel@vanquo.pezone.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On ons, 2009-10-21 at 10:28 -0300, Alvaro Herrera wrote:
> Peter Eisentraut wrote:
> > Could someone clarify why this (from PG 8.4)
> >
> > # \du
> > List of roles
> > Role name | Attributes | Member of
> > ---------------+-------------+------------
> > admin | Create role | {}
> > : Create DB
> > postgres | Superuser | {}
> > : Create role
> > : Create DB
> > someotheruser | | {}
> > someuser | | {}
> >
> > is an improvement over this (from PG 8.3)
>
> The reason it's an improvement of sorts is that there are now more
> possible attributes, and if we had kept adding columns it would have
> become wider than 80 columns.

How relevant is that 80 columns? I did a mockup using the old design
with two extra columns added and it fit within 100 columns, which still
leaves plenty of horizontal space on the screen.

As a compromise, we could keep the combined "Attributes" column but
replace the line breaks by commas. This would at least get rid of the
confusing and ugly line breaks in the common cases.

> If there's a way to have the attributes as a single line,
> comma-separated, but that wraps around when exceeding the terminal
> width, I'm all for it. We could also use that logic in a lot more
> \-commands, so it'd be worthwhile I think.

Well, the opposite argument could also be made. When the display gets
too long, switch to a wider format.

The argument could be made, however, that it is more important to keep
the relevant information (the role names) on one screen instead of
trying too hard to fit the less important information (the attributes)
on one screen.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Roger Leigh 2009-10-31 11:28:23 Re: Unicode UTF-8 table formatting for psql text output
Previous Message Magnus Hagander 2009-10-31 10:20:45 Re: [HACKERS] FTP/GIT/WWW server move