Re: Counting lines correctly in psql help displays - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Counting lines correctly in psql help displays
Date
Msg-id 30394.1441808870@sss.pgh.pa.us
Whole thread Raw
In response to Re: Counting lines correctly in psql help displays  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: Counting lines correctly in psql help displays  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> On 09/05/2015 12:55 PM, Tom Lane wrote:
>> Or we could just give up and replace the counts by INT_MAX, forcing use
>> of the pager unless you've turned it off.  All of those outputs are long
>> enough now that it's hard to believe there are any common screen layouts
>> where you don't end up invoking the pager anyway.  (usage() is 60 lines,
>> the others are more.)  This is probably the reason why we've seldom
>> noticed they're wrong --- it barely matters anymore.
>> 
>> One way or the other I think it's past time to get out of the business
>> of maintaining these counts.  I'm willing to do the work of using a
>> PQExpBuffer if people think it's worth the trouble to have an accurate
>> count, but it may not be worth the code space.

> I'm not terribly happy about the INT_MAX idea. Counting lines in a 
> PGExpBuffer seems OK. That way we could honor pager_min_lines, I hope.

TBH, I'm not detecting enough concern about this issue to make it worth
doing more than replacing the counts by INT_MAX.  Nobody has stepped up
and said "yeah, my terminal window is 100 lines high and I'll be really
annoyed if \? invokes the pager unnecessarily".  I plan to just do the
three-line fix and move on.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: [HACKERS] 答复:[HACKERS] 答复:[HACKERS] about fsync in CLOG buffer write
Next
From: Tom Lane
Date:
Subject: Re: Re: [HACKERS] 答复:[HACKERS] 答复:[HACKERS] about fsync in CLOG buffer write