Re: Counting lines correctly in psql help displays

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Counting lines correctly in psql help displays
Date: 2015-09-09 15:04:28
Message-ID: 55F04A7C.3060704@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 09/09/2015 10:27 AM, Tom Lane wrote:
> Andrew Dunstan <andrew(at)dunslane(dot)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.
>
>

Do people really use terminals without scrollbars for serious work any
more? Personally I'm in favor of forcing the pager less, not more. But
I'm not going to make a fuss, I'm just surprised.

cheers

andrew

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2015-09-09 15:07:00 Re: Parallel Seq Scan
Previous Message Robert Haas 2015-09-09 15:00:20 Re: [PATCH] SQL function to report log message