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

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Álvaro Herrera <alvherre@kurilemu.de>
Cc: Aleksander Alekseev <aleksander@tigerdata.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, Nathan Bossart <nathandbossart@gmail.com>, Chao Li <li.evan.chao@gmail.com>, Arseniy Mukhin <arseniy.mukhin.dev@gmail.com>, Bruce Momjian <bruce@momjian.us>, Michael Paquier <michael@paquier.xyz>
Date: 2025-12-12T16:17:01Z
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

=?utf-8?Q?=C3=81lvaro?= Herrera <alvherre@kurilemu.de> writes:
> It's strange to see this thread go on about messing with the Perl script
> because we're too afraid of pg_bsd_indent.  Maybe we should take
> ownership of that code -- improve its own indentation to our
> conventions, add comments, rename unclear variables, and so on until we
> have something we can work with, and fix these weird bugs and
> idiosincratic behaviors we don't like.  I just found out this code dates
> back from 1976.

I've worked with that code a little bit, and it's mostly unreadable
spaghetti :-(.  If somebody wants to make an effort to make it not
so awful, that'd be great, but I fear it's a very nontrivial project.

Having said that, we've already basically forked it from the NetBSD
upstream, so there is no reason not to diverge further.

> We have a _huge_ regression test for it: our own source code repository.
> It's not like any breakage is going to go unnoticed.

True.

			regards, tom lane