Re: \du quite ugly in 8.4

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: \du quite ugly in 8.4
Дата
Msg-id 1256985056.28195.9.camel@vanquo.pezone.net
обсуждение исходный текст
Ответ на Re: \du quite ugly in 8.4  (Alvaro Herrera <alvherre@commandprompt.com>)
Ответы Re: \du quite ugly in 8.4  (Alvaro Herrera <alvherre@commandprompt.com>)
Список 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.




В списке pgsql-hackers по дате отправления:

Предыдущее
От: Magnus Hagander
Дата:
Сообщение: Re: [pgsql-www] FTP/GIT/WWW server move
Следующее
От: Roger Leigh
Дата:
Сообщение: Re: Unicode UTF-8 table formatting for psql text output