Re: psql: Count all table footer lines in pager setup

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Erik Wienhold <ewie(at)ewie(dot)name>
Cc: Greg Sabino Mullane <htamfids(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: psql: Count all table footer lines in pager setup
Date: 2025-10-06 22:45:19
Message-ID: 2222791.1759790719@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

Attachment Content-Type Size
v6-0001-Improve-psql-s-ability-to-select-pager-mode-accur.patch text/x-diff 12.0 KB
v6-0002-Make-some-minor-performance-improvements-in-psql-.patch text/x-diff 8.1 KB
v6-0003-Add-a-TAP-test-to-exercise-psql-s-use-of-the-page.patch text/x-diff 4.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2025-10-06 22:52:26 Re: Should we update the random_page_cost default value?
Previous Message Melanie Plageman 2025-10-06 22:40:20 Re: eliminate xl_heap_visible to reduce WAL (and eventually set VM on-access)