Re: Modernizing pg_bsd_indent's error/warning reporting code

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ayush Tiwari <ayushtiwari(dot)slg01(at)gmail(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Modernizing pg_bsd_indent's error/warning reporting code
Date: 2026-06-15 16:26:53
Message-ID: 235695.1781540813@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Ayush Tiwari <ayushtiwari(dot)slg01(at)gmail(dot)com> writes:
> On Fri, 12 Jun 2026 at 22:29, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> This is not an unreasonable suggestion, and presumably more people
>> will start seeing this as they adopt newer clang versions. (I see
>> the same on Fedora 44, for instance.) So I think we ought to take
>> the advice, and while we're at it let's convert this code to use
>> varargs instead of several duplicative functions. Patch attached.

> Patch looks good to me,

Thanks for looking!

> Just a minor comment, while we are at it, should we change
> the %zd to %zu for nitems since it looks like it uses size_t?

Seems reasonable enough. It can't matter functionally, since
the denominators in nitems() are surely at least 2. But it is
indeed customary to print size_t with %zu, so done that way.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Álvaro Herrera 2026-06-15 16:50:54 Re: [PATCH] REPLICA IDENTITY USING INDEX accepts column with invalid NOT NULL
Previous Message Andres Freund 2026-06-15 16:18:43 Re: BM_IO_ERROR flag is lost in TerminateBufferIO due to order of operations in UnlockBufHdrExt