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 and...@dunslane.net writes: I often get annoyed because psql is a bit too aggressive when it

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

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 and...@2ndquadrant.com 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

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 and...@2ndquadrant.com 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

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

2015-03-26 Thread Tom Lane
Andres Freund and...@2ndquadrant.com 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

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 and...@dunslane.net writes: I often get annoyed because psql is a bit too aggressive when it decides whether to put output through the pager,

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 say

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-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 and...@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

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

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

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 and...@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

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

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

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 and...@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

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 and...@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

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 and...@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

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 lt; andrew@ gt; 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

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 david.g.johns...@gmail.com 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

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 robertmh...@gmail.com wrote: On Thu, Nov 13, 2014 at 11:54 AM, David G Johnston david.g.johns...@gmail.com 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

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 mmonc...@gmail.com wrote: On Thu, Nov 13, 2014 at 11:39 AM, Robert Haas robertmh...@gmail.com wrote: On Thu, Nov 13, 2014 at 11:54 AM, David G Johnston david.g.johns...@gmail.com wrote: Because I might be quite happy with 100 or 200 lines I

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 and...@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

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 and...@2ndquadrant.com wrote: On 2014-11-13 11:09:06 -0500, Tom Lane wrote: Andrew Dunstan and...@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

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 david.g.johns...@gmail.com wrote: On Thu, Nov 13, 2014 at 10:55 AM, Merlin Moncure mmonc...@gmail.com wrote: On Thu, Nov 13, 2014 at 11:39 AM, Robert Haas robertmh...@gmail.com wrote: On Thu, Nov 13, 2014 at 11:54 AM, David G Johnston