Re: [PATCH] pg_bsd_indent: improve formatting of multiline comments

Aleksander Alekseev <aleksander@tigerdata.com>

From: Aleksander Alekseev <aleksander@tigerdata.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, Nathan Bossart <nathandbossart@gmail.com>
Date: 2026-05-05T13:06:21Z
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 →
  1. pgindent: improve formatting of multiline comments.

  2. Adjust style of some debugging macros.

  3. Fix a couple of comments.

  4. Add IGNORE NULLS/RESPECT NULLS option to Window functions.

  5. Split WaitEventSet functions to separate source file

Attachments

Hi Tom,

Thanks for your feedback.

> In this case the problem is that the cleanup pattern only accounts for
> one trailing space.  But a variant of this, which I think affects many
> of the steps in the patch, is that there could be tab(s) there.  You
> should fix the patterns to allow any number of spaces/tabs at the
> spots where they currently expect just one space.  This might result
> in finding cleanups they miss now.

Fair point. Fixed.

> Another amusing diff I noticed:
>
> [...]
>
> Clearly, this is somebody's off-by-one-key typo, and the correct
> fix is s/&/*/.  I suspect that fixing that manually is the most
> expedient answer, rather than trying to make pg_bsd_indent smart
> enough to DTRT.

Agree.

> One other nitpick is that the patch itself needs to be run through
> pgperltidy (which has different opinions than your editor about
> tabs vs spaces, apparently).

Fixed in v7.

-- 
Best regards,
Aleksander Alekseev