proposal: psql - breaking rows in white chars for wrapped format

Поиск
Список
Период
Сортировка
Искать
От
Pavel Stehule
Тема
proposal: psql - breaking rows in white chars for wrapped format
Дата
Msg-id
162867790903021024j66d1a282v34a97b9e1a271bef@mail.gmail.com
Список
Дерево обсуждения
proposal: psql - breaking rows in white chars for wrapped format Pavel Stehule <pavel.stehule@gmail.com>
Re: proposal: psql - breaking rows in white chars for wrapped format Tom Lane <tgl@sss.pgh.pa.us>
Re: proposal: psql - breaking rows in white chars for wrapped format Pavel Stehule <pavel.stehule@gmail.com>
Re: proposal: psql - breaking rows in white chars for wrapped format Pavel Stehule <pavel.stehule@gmail.com>
Hello

Current wrapped format doesn't break rows well (after white chars). I
propose change this behave (to more typical for text):

Current:

postgres=# \pset format wrappedOutput format is wrapped.
postgres=# select a from test;                          a
--------------------------------------------------------There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don't look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn't anything embarrassing hidden in the middle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It uses a dictionary of over 200 Latin words, combinedwith a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc.
(1 row)

Proposal:
postgres=# \pset format wrapped
Output format is wrapped.
postgres=# select a from test;                          a
--------------------------------------------------------There are many variations of passages of Lorem Ipsumavailable, but the majority have suffered alterationin some form, by injected humour, or randomised wordswhich don't look even slightly believable. If you aregoing to use a passage of Lorem Ipsum, you need to besure there isn't anything embarrassing hidden in themiddle of text. All the Lorem Ipsum generators on theInternet tend to repeat predefined chunks asnecessary, making this the first true generator on theInternet. It uses a dictionary of over 200 Latinwords, combined with a handful of model sentencestructures, to generate Lorem Ipsum which looksreasonable. The generated Lorem Ipsum is thereforealways free from repetition, injected humour, ornon-characteristic words etc.
(1 row)

It should be implemented via checking white chars inside
strlen_max_width function.

any notices, ideas welcome

regards
Pavel Stehule

В списке pgsql-hackers по дате отправления
От: Greg Stark
Дата:
От: Tom Lane
Дата:
FAQ