From: | BharatDB <bharatdbpg(at)gmail(dot)com> |
---|---|
To: | Erik Wienhold <ewie(at)ewie(dot)name> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, 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-10 07:04:50 |
Message-ID: | CAAh00EQcJqwTUqeK2bS_VJUT+CGa0YgweaTVkXbfk3bVv-pDnw@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)ewie(dot)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 | Content-Type | Size |
---|---|---|
0001-Fix-pager-trigger-in-print.c-by-using-linecount-help.patch | text/x-patch | 1.4 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | jian he | 2025-10-10 07:10:11 | Re: speedup COPY TO for partitioned table. |
Previous Message | Chao Li | 2025-10-10 07:00:35 | URLs in rbtree.c are broken |