Re: psql: Count all table footer lines in pager setup - Mailing list pgsql-hackers

From BharatDB
Subject Re: psql: Count all table footer lines in pager setup
Date
Msg-id CAAh00EQcJqwTUqeK2bS_VJUT+CGa0YgweaTVkXbfk3bVv-pDnw@mail.gmail.com
Whole thread Raw
In response to Re: psql: Count all table footer lines in pager setup  (Erik Wienhold <ewie@ewie.name>)
List pgsql-hackers

Dear Team,

I worked on the pager issue in print.c and made the following updates:

  • Added a linecount() helper to correctly count all lines, including footers.

  • In IsPagerNeeded , replaced the old logic lines++ with lines += linecount(f->data).

With this fix, the pager now triggers correctly for long outputs.
Please let me know if this way of fixing looks good, or if you have any suggestions for improvement.

Best regards,
[lakshmi G]


On Wed, Oct 8, 2025 at 2:40 PM Erik Wienhold <ewie@ewie.name> wrote:
On 2025-10-07 17:01 +0200, Tom Lane wrote:
> Pushed, after a tiny bit more comment-burnishing.

Thank you for the extensive rework.

--
Erik Wienhold


Attachment

pgsql-hackers by date:

Previous
From: Chao Li
Date:
Subject: URLs in rbtree.c are broken
Next
From: jian he
Date:
Subject: Re: speedup COPY TO for partitioned table.