Re: controlling psql's use of the pager a bit more - Mailing list pgsql-hackers

From Michael Banck
Subject Re: controlling psql's use of the pager a bit more
Date
Msg-id 20141113165019.GA32412@raptor.chemicalconnection.dyndns.org
Whole thread Raw
In response to Re: controlling psql's use of the pager a bit more  (Andres Freund <andres@2ndquadrant.com>)
List 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@dunslane.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



pgsql-hackers by date:

Previous
From: "Tomas Vondra"
Date:
Subject: Re: WIP: multivariate statistics / proof of concept
Next
From: Robert Haas
Date:
Subject: Re: On partitioning