Re: proposal: psql concise mode

Поиск
Список
Период
Сортировка
От Josh Kupershmidt
Тема Re: proposal: psql concise mode
Дата
Msg-id CAK3UJRECwFCyQ9_L85XivSnQE-jvrxcBH4gAWiGYsDMMbE6nOg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: proposal: psql concise mode  (Bruce Momjian <bruce@momjian.us>)
Ответы Re: proposal: psql concise mode  ("Dickson S. Guedes" <listas@guedesoft.net>)
Список pgsql-hackers
On Thu, Nov 10, 2011 at 3:41 PM, Bruce Momjian <bruce@momjian.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,
usernametext 
);

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.


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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: Parsing output of EXPLAIN command in PostgreSQL
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Parsing output of EXPLAIN command in PostgreSQL