Re: [PATCH] pg_bsd_indent: improve formatting of multiline comments
Nathan Bossart <nathandbossart@gmail.com>
From: Nathan Bossart <nathandbossart@gmail.com>
To: Aleksander Alekseev <aleksander@tigerdata.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, Arseniy Mukhin <arseniy.mukhin.dev@gmail.com>, Bruce Momjian <bruce@momjian.us>, Michael Paquier <michael@paquier.xyz>
Date: 2025-10-27T14:55:38Z
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 →
-
pgindent: improve formatting of multiline comments.
- 60f9467c3834 19 (unreleased) landed
-
Adjust style of some debugging macros.
- ba1e14134a77 19 (unreleased) landed
-
Fix a couple of comments.
- 123661427b97 19 (unreleased) landed
-
Add IGNORE NULLS/RESPECT NULLS option to Window functions.
- 25a30bbd4235 19 (unreleased) cited
-
Split WaitEventSet functions to separate source file
- 393e0d231405 18.0 cited
On Mon, Oct 27, 2025 at 03:13:33PM +0300, Aleksander Alekseev wrote: > OK, here is the corrected patch v5. Thanks. I had to run pgindent twice before it stopped making changes, but the results look pretty good to me. However, I still noticed a few oddities. --- a/contrib/seg/seg.c +++ b/contrib/seg/seg.c @@ -2,9 +2,9 @@ * contrib/seg/seg.c * ****************************************************************************** - This file contains routines that can be bound to a Postgres backend and - called by the backend in the process of processing queries. The calling - format for these routines is dictated by Postgres architecture. + * This file contains routines that can be bound to a Postgres backend and + * called by the backend in the process of processing queries. The calling + * format for these routines is dictated by Postgres architecture. ******************************************************************************/ This one is a little weird, but maybe it's okay... It looks like pgindent retains the spacing (or lack of spacing) in this situation. It's probably not worth the complexity to try to make it smarter here. --- a/src/backend/access/nbtree/nbtsort.c +++ b/src/backend/access/nbtree/nbtsort.c @@ -69,7 +69,7 @@ /* * DISABLE_LEADER_PARTICIPATION disables the leader's participation in * parallel index builds. This may be useful as a debugging aid. -#undef DISABLE_LEADER_PARTICIPATION + *#undef DISABLE_LEADER_PARTICIPATION */ IMHO we should either remove this line or move it out of the comment. AFAICT we ordinarily don't #undef debugging stuff like this, presumably so you can change it with compile flags. In aclcheck.c and analyze.c, The **** and ==== lines are still getting bumped down to a new line. -.* This function just encapsulates the framing rules. + *.* This function just encapsulates the framing rules. This looks like a goof in commit 25a30bb. I'll go fix that one separately. --- a/src/backend/storage/ipc/waiteventset.c +++ b/src/backend/storage/ipc/waiteventset.c @@ -2010,7 +2010,7 @@ ResOwnerReleaseWaitEventSet(Datum res) * NB: be sure to save and restore errno around it. (That's standard practice * in most signal handlers, of course, but we used to omit it in handlers that * only set a flag.) XXX - * + * * This one looks like a goof in commit 393e0d2. It's interesting that pgindent chooses to add an extra * here, though. -- nathan