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-02T21:00:30Z
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
- v4-0001-Improve-psql-s-ability-to-select-pager-mode-accur.patch (text/x-diff) patch v4-0001
- v4-0002-Make-some-minor-performance-improvements-in-psql-.patch (text/x-diff) patch v4-0002
- v4-0003-Add-a-TAP-test-to-exercise-psql-s-use-of-PAGER.patch (text/x-diff) patch v4-0003
Erik Wienhold <ewie@ewie.name> writes: > On 2025-10-02 00:25 +0200, Tom Lane wrote: >> I am not entirely sure that we should commit 0002 though; it may be >> that the savings is down in the noise anyway once you consider all the >> other work that happens while printing a big table. A positive reason >> not to take it is something I realized while checking test coverage: >> we never execute any of the maybe-use-the-pager branch of PageOutput >> in the regression tests, because isatty(stdout) will always fail. I realized that we could address that if we really wanted to, using the same infrastructure as for tab-completion testing. 0001 and 0002 attached are the same as before, and then I added 0003 which adds a draft-quality TAP test. Code coverage checks show that this adds only about 10 more lines of coverage in psql proper, but in print.c most of the pager-related logic is now covered. regards, tom lane