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

From Jeff Janes
Subject Re: controlling psql's use of the pager a bit more
Date
Msg-id CAMkU=1xXzHqGmBAHqXhqPk2X6qMi0M+iP4Q-nJKRypFa0BCqzQ@mail.gmail.com
Whole thread Raw
In response to controlling psql's use of the pager a bit more  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
On Thu, Nov 13, 2014 at 7:52 AM, Andrew Dunstan <andrew@dunslane.net> wrote:

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.

+1.

If it scrolls 2 or 3 lines off the top, I can just use the scroll-back buffer to look at them, I don't want the pager for that situation.

But I am more interested in width, not length.  I don't want it to switch to the pager just because a couple lines would wrap, especially when looking at EXPLAIN output.  I have played with changing \pset columns, but then other things get screwy once you set that to a non-actual value.  I don't recall of the top of my head which things those are, though.

Cheers,

Jeff

pgsql-hackers by date:

Previous
From: David Johnston
Date:
Subject: Re: controlling psql's use of the pager a bit more
Next
From: Jeff Janes
Date:
Subject: Re: controlling psql's use of the pager a bit more