Re: psql wrapped format default for backslash-d commands - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: psql wrapped format default for backslash-d commands
Date
Msg-id 200805131421.m4DELY428770@momjian.us
Whole thread Raw
In response to Re: psql wrapped format default for backslash-d commands  (Bryce Nesbitt <bryce2@obviously.com>)
Responses Re: psql wrapped format default for backslash-d commands  (Alvaro Herrera <alvherre@commandprompt.com>)
Re: psql wrapped format default for backslash-d commands  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
Bryce Nesbitt wrote:
> 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.

Yea, you could probably call it a 'chopped' format rather than a
'wrapped' format.

While I got a lot of feedback on screen width detection for wrapped, I
got little freedback on the display format.  We can address that now.

I think we can wrap if there is whitespace within a few characters
before the break point, and use a dash if we have to break a word.  Is
that what people want?

Also, about the format 'auto' idea that uses expanded display, I am
thinking because expanded is a separate setting and not a format, I
should just add a possible 'auto' value to the expanded format that
could be triggered by either 'aligned' or 'wrapped' formats when the
output doesn't fit on the screen.

(In hindsight, I think we should have had pager be on/auto/off rather
than always/on/off;  the later is kind of confusing and would be
inconsistent if I add 'auto' to expanded.)

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com
 + If your life is a hard drive, Christ can be your backup. +


pgsql-hackers by date:

Previous
From: "Josh Tolley"
Date:
Subject: Re: Problem returning strings with pgsql 8.3.x
Next
From: Tom Lane
Date:
Subject: Re: Arbitary file size limit in twophase.c