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

From Alvaro Herrera
Subject Re: psql wrapped format default for backslash-d commands
Date
Msg-id 20080509211910.GL5748@alvh.no-ip.org
Whole thread Raw
In response to Re: psql wrapped format default for backslash-d commands  (Bruce Momjian <bruce@momjian.us>)
Responses Re: psql wrapped format default for backslash-d commands  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
List pgsql-hackers
Bruce Momjian escribió:

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

This is what I get by pasting from a 50-column aligned psql (8.3):
                                                   QUERY PLAN                                                     

-------------------------------------------------------------------------------------------------------------------Nested
Loop (cost=1.03..25.86 rows=807 width=673) (actual time=4.349..20.973 rows=1897 loops=1)  ->  Seq Scan on pg_type
(cost=0.00..8.69rows=269 width=563) (actual time=0.019..0.798 rows=271 loops=1)  ->  Materialize  (cost=1.03..1.06
rows=3width=110) (actual time=0.018..0.033 rows=7 loops=271)        ->  Seq Scan on pg_language  (cost=0.00..1.03
rows=3width=110) (actual time=4.296..4.312 rows=7 loops=1)Total runtime: 35.041 ms
 
(5 lignes)


No unwanted line breaks.  Of course, on the terminal it looks narrower,
but this doesn't affect cut'n paste behavior.

My conclusion is that we have to make very sure that "wrapped" is not
the default for explain.

FWIW this is expanded output:

alvherre=# \x
Affichage étendu activé.
alvherre=# explain analyze select * from pg_type, pg_language;
-[ RECORD 1
]-----------------------------------------------------------------------------------------------------------------
QUERY PLAN | Nested Loop  (cost=1.03..25.86 rows=807 width=673) (actual time=0.055..15.648 rows=1897 loops=1)
-[ RECORD 2
]-----------------------------------------------------------------------------------------------------------------
QUERY PLAN |   ->  Seq Scan on pg_type  (cost=0.00..8.69 rows=269 width=563) (actual time=0.019..0.623 rows=271
loops=1)
-[ RECORD 3
]-----------------------------------------------------------------------------------------------------------------
QUERY PLAN |   ->  Materialize  (cost=1.03..1.06 rows=3 width=110) (actual time=0.002..0.016 rows=7 loops=271)
-[ RECORD 4
]-----------------------------------------------------------------------------------------------------------------
QUERY PLAN |         ->  Seq Scan on pg_language  (cost=0.00..1.03 rows=3 width=110) (actual time=0.005..0.021 rows=7
loops=1)
-[ RECORD 5
]-----------------------------------------------------------------------------------------------------------------
QUERY PLAN | Total runtime: 19.649 ms



-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: psql wrapped format default for backslash-dcommands
Next
From: "Kevin Grittner"
Date:
Subject: Re: psql wrapped format default for backslash-d commands