Re: Fwd: Another little thing about psql wrapped expanded output

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Fwd: Another little thing about psql wrapped expanded output
Date: 2015-12-09 00:03:36
Message-ID: CAKFQuwZEOgUsZv+9dh2RezQYqhLRM0ZYHZdefxt-aLBuKy83MA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Dec 8, 2015 at 12:36 PM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:

> On Wed, Dec 2, 2015 at 5:24 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> > Jeff Janes <jeff(dot)janes(at)gmail(dot)com> writes:
> >> On Wed, Dec 2, 2015 at 12:37 PM, Josh Berkus <josh(at)agliodbs(dot)com> wrote:
> >>> If you're fixing the dashed-line code, is there a way to say that we
> >>> never have more than a reasonable number of dashes (ideally, the width
> >>> of the terminal) no matter how wide the data is? Having 4000 dashes
> >>> because of large text on one row is kinda painful, and not at all
> useful.
> >
> >> If you use the default format (\pset format aligned) in expanded mode,
> then
> >> I agree with you we shouldn't print a half screen full of dashes to
> >> separate every tuple.
> >
> > Don't think I agree. Suppose that you have a wider-than-screen table
> > and you use a pager to scroll left and right in that. If we shorten the
> > dashed lines, then once you scroll to the right of wherever they stop,
> > you lose that visual cue separating the rows. This matters a lot if
> > only a few of the column values are very wide: everywhere else, there's
> > gonna be lots of whitespace.
>
> For what it's worth, I'm with Josh and Jeff. My pager, like nearly
> everybody else's, is less. And it's not stupid to have a behavior
> that works reasonably with less's default settings. I haven't kept a
> count of the number of times I've had to scroll down through endless
> pages of dashes in order to find some data that's not dashes, but it's
> surely quite a few.
>
> Your point is also valid, so I don't mean to detract from that. But
> the status quo is definitely annoying.

​for those wishing to change the status quo the question is whether there
needs to be a way to get back to the present behavior and, more generally,
configure the behavior to taste while still having a reasonable default.

Losing a bit of usability in not being able to identify record boundaries
while viewing off to the right seems is a trade-off that feels right to
me. During interactive use SELECT * is quite useful but is hampered on
relations that just happen to have a wide column that you don't care about
but also don't want to waste the effort to specify all column names except
that one.

​So +1 from me.

David J.​

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2015-12-09 00:21:15 Re: PostgresNode::_update_pid using undefined variables in tap tests
Previous Message Jeff Janes 2015-12-09 00:02:44 Re: Using quicksort for every external sort run