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

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

From
Pavel Stehule
Date:
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,
butthe majority have suffered alteration in some form, by injected humour, or randomised words which don't look even
slightlybelievable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn't anything
embarrassinghidden in the middle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined
chunksas necessary, making this the first true generator on the Internet. It uses a dictionary of over 200 Latin words,
combinedwitha handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem
Ipsumis 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,
butthe majority have suffered alterationin some form, by injected humour, or randomised wordswhich don't look even
slightlybelievable. If you aregoing to use a passage of Lorem Ipsum, you need to besure there isn't anything
embarrassinghidden 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
witha handful of model sentencestructures, to generate Lorem Ipsum which looksreasonable. The generated Lorem Ipsum is
thereforealwaysfree 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


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

From
Tom Lane
Date:
Pavel Stehule <pavel.stehule@gmail.com> writes:
> Current wrapped format doesn't break rows well (after white chars). I
> propose change this behave (to more typical for text):

This was suggested and rejected already.  Please read the earlier thread.
        regards, tom lane


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

From
Pavel Stehule
Date:
2009/3/2 Tom Lane <tgl@sss.pgh.pa.us>:
> Pavel Stehule <pavel.stehule@gmail.com> writes:
>> Current wrapped format doesn't break rows well (after white chars). I
>> propose change this behave (to more typical for text):
>
> This was suggested and rejected already.  Please read the earlier thread.
>
>                        regards, tom lane
>

ok,

regards
Pavel Stehule


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

From
Pavel Stehule
Date:
2009/3/2 Tom Lane <tgl@sss.pgh.pa.us>:
> Pavel Stehule <pavel.stehule@gmail.com> writes:
>> Current wrapped format doesn't break rows well (after white chars). I
>> propose change this behave (to more typical for text):
>
> This was suggested and rejected already.  Please read the earlier thread.
>
>                        regards, tom lane
>

Hi,

I found some, but I really don't understand, what this proposal was
rejected. Please, can you specify an main objections?

Thank You
Pavel Stehule