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 200805092053.m49Krq529089@momjian.us
Whole thread Raw
In response to Re: psql wrapped format default for backslash-d commands  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Responses Re: psql wrapped format default for backslash-dcommands  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Re: psql wrapped format default for backslash-d commands  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-hackers
Kevin Grittner wrote:
> >>> "Brendan Jurd" <direvus@gmail.com> wrote: 
> > On Sat, May 10, 2008 at 3:52 AM, Bruce Momjian <bruce@momjian.us>
> wrote:
> >> Now that psql '\pset format wrapped' is in CVS, we should consider
> when
> >> we want to use 'wrapped' format by default.  I think psql \df and
> \dT
> >> certainly can benefit from wrapped mode.  \df+ even displays,
> though
> >> there is quite a bit of wrapping.
> > 
> > I for one would definitely like backslash commands with very wide
> > output to be wrapped by default.
>  
> I would prefer the default to be the current 8.2 behavior.  As long as
> I can configure that easily it's not a huge deal, but I may have to
> deal with some users whose ad hoc queries feed into spreadsheets or
> some such that will be broken until they do something new.
>  
> I currently use \x to view results about once a month (on average).  I
> expect to find wrapped columns useful about that often.  I cut and
> paste multi-line unwrapped output from my console window practically
> daily, and the wrapping would make that painful.  That just got me
> thinking -- has anyone tried this out with EXPLAIN ANALYZE output yet?

No, but I just tried it:
test=> \pset format wrappedOutput format is wrapped.test=> \pset columns 50Target width for "wrapped" format is
50.test=>explain analyze select * from pg_type, pg_language;                    QUERY
PLAN--------------------------------------------------Nested Loop  (cost=1.03..25.86 rows=807 width=66 5) (actual
time=0.037..4.528rows=807 loops=1)   ->  Seq Scan on pg_type  (cost=0.00..8.69 rows =269 width=555) (actual
time=0.018..0.377rows=2 69 loops=1)   ->  Materialize  (cost=1.03..1.06 rows=3 width =110) (actual time=0.001..0.005
rows=3loops=269 )         ->  Seq Scan on pg_language  (cost=0.00. .1.03 rows=3 width=110) (actual time=0.004..0.00 7
rows=3loops=1) Total runtime: 5.490 ms(5 rows)
 

Of course, running it on a 50-column display in 'aligned' mode isn't
going to look good either.

--  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: Bruce Momjian
Date:
Subject: Re: psql wrapped format default for backslash-d commands
Next
From: "Kevin Grittner"
Date:
Subject: Re: psql wrapped format default for backslash-dcommands