Re: psql: Count all table footer lines in pager setup
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Erik Wienhold <ewie@ewie.name>
Cc: Greg Sabino Mullane <htamfids@gmail.com>, pgsql-hackers@postgresql.org
Date: 2025-10-06T22:45:19Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Improve psql's ability to select pager mode accurately.
- 27da1a796ff9 19 (unreleased) landed
Attachments
- v6-0001-Improve-psql-s-ability-to-select-pager-mode-accur.patch (text/x-diff) patch v6-0001
- v6-0002-Make-some-minor-performance-improvements-in-psql-.patch (text/x-diff) patch v6-0002
- v6-0003-Add-a-TAP-test-to-exercise-psql-s-use-of-the-page.patch (text/x-diff) patch v6-0003
I wrote: > Another inaccuracy that I find mildly annoying now that we've got it > mostly right is that we are not accounting for the blank line that > psql likes to print after the query result, so that you can still > end with the first output line scrolled off your screen despite > non-use of the pager. Not sure about a non-kluge way to count that, > though: it's outside the domain of print.c, and other callers might > not have a similar behavior. Oh wait! That line *is* produced within print.c, so there is no reason we shouldn't account for it. I spent a little extra effort on unaligned mode too, since the TAP test is checking that case. I still doubt that anyone's going to care a lot about the other formats. regards, tom lane