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

2015-03-26 Thread Andrew Dunstan
On 03/26/2015 11:10 AM, Tom Lane wrote: Andres Freund writes: Without having actually tried it, it looks clean enough to me. If there's more pager options we might at some point introduce a pager options struct instead adding more options to PageOutput. But for now it seems ok enough. My reac

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

2015-03-26 Thread Andrew Dunstan
On 03/26/2015 11:10 AM, Tom Lane wrote: Andres Freund writes: Without having actually tried it, it looks clean enough to me. If there's more pager options we might at some point introduce a pager options struct instead adding more options to PageOutput. But for now it seems ok enough. My reac

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

2015-03-26 Thread Tom Lane
Andres Freund writes: > Without having actually tried it, it looks clean enough to me. If > there's more pager options we might at some point introduce a pager > options struct instead adding more options to PageOutput. But for now it > seems ok enough. My reaction is that now would be the time t

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

2015-03-26 Thread Andres Freund
On 2014-12-21 14:22:10 -0500, Andrew Dunstan wrote: > @@ -301,11 +301,11 @@ slashUsage(unsigned short int pager) > * show list of available variables (options) from command line > */ > void > -helpVariables(unsigned short int pager) > +helpVariables(unsigned short int pager, int pager_min

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

2015-03-26 Thread Andrew Dunstan
On 12/21/2014 02:22 PM, Andrew Dunstan wrote: On 11/15/2014 05:56 PM, Andrew Dunstan wrote: On 11/13/2014 11:41 AM, Andrew Dunstan wrote: On 11/13/2014 11:09 AM, Tom Lane wrote: Andrew Dunstan writes: I often get annoyed because psql is a bit too aggressive when it decides whether to put

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

2014-12-21 Thread Andrew Dunstan
On 11/15/2014 05:56 PM, Andrew Dunstan wrote: On 11/13/2014 11:41 AM, Andrew Dunstan wrote: On 11/13/2014 11:09 AM, Tom Lane wrote: Andrew Dunstan 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 a

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

2014-12-04 Thread Andrew Dunstan
On 12/04/2014 03:53 PM, Alvaro Herrera wrote: Andrew Dunstan wrote: However, there is more work to do. As Tom noted upthread, psql's calculation of the number of lines is pretty bad. For example, if I do: \pset pager_min_lines 100 select * from generate_series(1,50); the pager still

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

2014-12-04 Thread Alvaro Herrera
Andrew Dunstan wrote: > However, there is more work to do. As Tom noted upthread, psql's calculation > of the number of lines is pretty bad. For example, if I do: > >\pset pager_min_lines 100 >select * from generate_series(1,50); > > the pager still gets invoked, which is unfortunate to

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

2014-11-15 Thread Andrew Dunstan
On 11/13/2014 11:41 AM, Andrew Dunstan wrote: On 11/13/2014 11:09 AM, Tom Lane wrote: Andrew Dunstan 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 ca

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

2014-11-13 Thread Merlin Moncure
On Thu, Nov 13, 2014 at 12:03 PM, David Johnston wrote: > On Thu, Nov 13, 2014 at 10:55 AM, Merlin Moncure wrote: >> >> On Thu, Nov 13, 2014 at 11:39 AM, Robert Haas >> wrote: >> > On Thu, Nov 13, 2014 at 11:54 AM, David G Johnston >> > wrote: >> >>> Because I might be quite happy with 100 or 2

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

2014-11-13 Thread Jeff Janes
On Thu, Nov 13, 2014 at 8:14 AM, Andres Freund wrote: > On 2014-11-13 11:09:06 -0500, Tom Lane wrote: > > Andrew Dunstan 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

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

2014-11-13 Thread Jeff Janes
On Thu, Nov 13, 2014 at 7:52 AM, Andrew Dunstan 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 li

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

2014-11-13 Thread David Johnston
On Thu, Nov 13, 2014 at 10:55 AM, Merlin Moncure wrote: > On Thu, Nov 13, 2014 at 11:39 AM, Robert Haas > wrote: > > On Thu, Nov 13, 2014 at 11:54 AM, David G Johnston > > wrote: > >>> Because I might be quite happy with 100 or 200 lines I can just scroll > >>> in my terminal's scroll buffer, b

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

2014-11-13 Thread Merlin Moncure
On Thu, Nov 13, 2014 at 11:39 AM, Robert Haas wrote: > On Thu, Nov 13, 2014 at 11:54 AM, David G Johnston > wrote: >>> Because I might be quite happy with 100 or 200 lines I can just scroll >>> in my terminal's scroll buffer, but want to use the pager for more than >>> that. This is useful especi

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

2014-11-13 Thread Robert Haas
On Thu, Nov 13, 2014 at 11:54 AM, David G Johnston wrote: >> Because I might be quite happy with 100 or 200 lines I can just scroll >> in my terminal's scroll buffer, but want to use the pager for more than >> that. This is useful especially if I want to scroll back and see the >> results from a q

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

2014-11-13 Thread David G Johnston
Andrew Dunstan wrote > On 11/13/2014 11:09 AM, Tom Lane wrote: >> Andrew Dunstan < > andrew@ > > 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

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

2014-11-13 Thread Michael Banck
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 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 >

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

2014-11-13 Thread Andrew Dunstan
On 11/13/2014 11:09 AM, Tom Lane wrote: Andrew Dunstan 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 l

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

2014-11-13 Thread Andres Freund
On 2014-11-13 11:09:06 -0500, Tom Lane wrote: > Andrew Dunstan 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 m

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

2014-11-13 Thread Tom Lane
Andrew Dunstan 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 w

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

2014-11-13 Thread Thom Brown
On 13 November 2014 15:52, Andrew Dunstan 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