Re: controlling psql's use of the pager a bit more

From: Michael Banck <michael(dot)banck(at)credativ(dot)de>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: controlling psql's use of the pager a bit more
Date: 2014-11-13 16:50:20
Message-ID: 20141113165019.GA32412@raptor.chemicalconnection.dyndns.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Nov 13, 2014 at 05:14:47PM +0100, Andres Freund wrote:
> On 2014-11-13 11:09:06 -0500, Tom Lane wrote:
> > Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> > > I often get annoyed because psql is a bit too aggressive when it decides
> > > whether to put output through the pager, and the only way to avoid this
> > > is to turn the pager off (in which case your next query might dump many
> > > thousands of lines to the screen). I'd like a way to be able to specify
> > > a minumum number of lines of output before psql would invoke the pager,
> > > rather than just always using the terminal window size.
> >
> > Are you saying you'd want to set the threshold to *more* than the window
> > height? Why?
>
> Not sure what that'd be useful for.

If the output is of the same order of magnitude as the window height, it
is still easy to compare the new output with whatever was above it by
conventional terminal scrolling (pgup, screen scrolling, whatever, if
present). If a comparison is desired in the first place, that is.

If the output goes to the pager, you're stuck with it. Unless of course
if the pager could somehow include the previous output up to some
threshold (while still being positioned at the beginning of the new
output in order to retain current behaviour), so one could scroll up in
the pager window. That would rock.

Michael

--
Michael Banck
Tel.: +49 (0) 2161 / 4643-171

credativ GmbH, HRB Mönchengladbach 12080
Hohenzollernstr. 133, 41061 Mönchengladbach
Geschäftsführung: Dr. Michael Meskes, Jörg Folz, Sascha Heuer

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2014-11-13 16:51:34 Re: On partitioning
Previous Message Tomas Vondra 2014-11-13 16:42:25 Re: WIP: multivariate statistics / proof of concept