Re: Another little thing about psql wrapped expanded output

From: David Fetter <david(at)fetter(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Another little thing about psql wrapped expanded output
Date: 2015-12-01 19:20:54
Message-ID: 20151201192054.GB2597@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Dec 01, 2015 at 11:20:53AM -0500, Tom Lane wrote:
> regression=# \pset format wrapped
> Output format is wrapped.
> regression=# \x
> Expanded display is on.
> regression=# select * from int8_tbl;
> -[ RECORD 1 ]-------------------------------------------------------------------
> q1 | 123
> q2 | 456
> -[ RECORD 2 ]-------------------------------------------------------------------
> q1 | 123
> q2 | 4567890123456789
> -[ RECORD 3 ]-------------------------------------------------------------------
> q1 | 4567890123456789
> q2 | 123
> -[ RECORD 4 ]-------------------------------------------------------------------
> q1 | 4567890123456789
> q2 | 4567890123456789
> -[ RECORD 5 ]-------------------------------------------------------------------
> q1 | 4567890123456789
> q2 | -4567890123456789
>
> Notice that the dashed lines go all the way to the right margin of my
> 80-column terminal window, even though the data requires no more than
> 22 columns. While this doesn't look so awful as-is, when I'm working
> in a very wide window it starts to look a little silly.
>
> The behavior I'd have expected is that if the data is narrower than
> the window, the lines only go to the right margin of the data. This
> is a trivial change to the logic in print_aligned_vertical, but before
> I go make it, does anyone want to argue that the current behavior is
> preferable to that?

+1 for changing it.

Cheers,
David.
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david(dot)fetter(at)gmail(dot)com

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2015-12-01 19:47:37 pgsql: Further tweaking of print_aligned_vertical().
Previous Message David E. Wheeler 2015-12-01 18:40:59 El Capitan Removes OpenSSL Headers