From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov> |
Cc: | Brendan Jurd <direvus(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: psql wrapped format default for backslash-d commands |
Date: | 2008-05-09 20:53:52 |
Message-ID: | 200805092053.m49Krq529089@momjian.us |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Kevin Grittner wrote:
> >>> "Brendan Jurd" <direvus(at)gmail(dot)com> wrote:
> > On Sat, May 10, 2008 at 3:52 AM, Bruce Momjian <bruce(at)momjian(dot)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 wrapped
Output format is wrapped.
test=> \pset columns 50
Target 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.528 rows=807 loops=1)
-> Seq Scan on pg_type (cost=0.00..8.69 rows
=269 width=555) (actual time=0.018..0.377 rows=2
69 loops=1)
-> Materialize (cost=1.03..1.06 rows=3 width
=110) (actual time=0.001..0.005 rows=3 loops=269
)
-> Seq Scan on pg_language (cost=0.00.
.1.03 rows=3 width=110) (actual time=0.004..0.00
7 rows=3 loops=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(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
From | Date | Subject | |
---|---|---|---|
Next Message | Kevin Grittner | 2008-05-09 21:07:37 | Re: psql wrapped format default for backslash-dcommands |
Previous Message | Bruce Momjian | 2008-05-09 20:51:17 | Re: psql wrapped format default for backslash-d commands |