Skip site navigation (1) Skip section navigation (2)

Re: psql wrapped format default for backslash-d commands

From: Bryce Nesbitt <bryce2(at)obviously(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: psql wrapped format default for backslash-d commands
Date: 2008-05-13 07:17:06
Message-ID: 48294072.20806@obviously.com (view raw or flat)
Thread:
Lists: pgsql-hackers
Brendan Jurd wrote:
> I really like the idea of wrapping, but after playing with the format
> a bit myself, I have to agree with Tom that breaking in the middle of
> words produces some very nasty output.
>
> If the format could be improved to only wrap on word boudaries, that
> would increase its appeal dramatically.
>
> Anybody got a rough idea how difficult it would be to add
> word-awareness int o the wrapping code?
>
> Cheers,
> BJ
>   
It's not that hard to do.

I chose not to, when writing the patch, because it makes the result flow 
over many more lines.
And regardless, it pretty much has to cut long "words", of which there 
are many in typical SQL output.
And, I hardly ever read actual large blocks of English at the SQL 
prompt, so: designing for that use case did
not float my boat at the time.
And, word wrapping messes with the cell contents more than I was 
comfortable doing. With the current wrapping all whitespace is preserved 
and apparent.

But, if your boat is floated, then by all means go for it.

                            -Bryce


In response to

Responses

pgsql-hackers by date

Next:From: Dave PageDate: 2008-05-13 07:42:26
Subject: Re: odd output in restore mode
Previous:From: Brendan JurdDate: 2008-05-13 06:39:55
Subject: Re: psql wrapped format default for backslash-d commands

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group