From: Nathan Bossart <nathandbossart@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Álvaro Herrera <alvherre@kurilemu.de>
Cc: Aleksander Alekseev <aleksander@tigerdata.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Cc: Chao Li <li.evan.chao@gmail.com>
Cc: Arseniy Mukhin <arseniy.mukhin.dev@gmail.com>
Cc: Bruce Momjian <bruce@momjian.us>
Cc: Michael Paquier <michael@paquier.xyz>
Subject: Re: [PATCH] pg_bsd_indent: improve formatting of multiline comments
Date: Fri, 12 Dec 2025 10:23:14 -0600
Message-ID: <aTxBcklpZcHAUAi1@nathan> (raw)
In-Reply-To: <1000974.1765556221@sss.pgh.pa.us>
References: <202512121547.dwkzxcs56227@alvherre.pgsql>
<1000974.1765556221@sss.pgh.pa.us>
On Fri, Dec 12, 2025 at 11:17:01AM -0500, Tom Lane wrote:
> =?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.
Yeah, I tried to find a bug in it recently and could do little more than
trial-and-error in the areas that seemed vaguely close (with no success).
I'm generally critical of efforts to rewrite things from scratch, but this
might be a case where it's the better option.
--
nathan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: nathandbossart@gmail.com, tgl@sss.pgh.pa.us, alvherre@kurilemu.de, aleksander@tigerdata.com, pgsql-hackers@lists.postgresql.org, li.evan.chao@gmail.com, arseniy.mukhin.dev@gmail.com, bruce@momjian.us, michael@paquier.xyz
Subject: Re: [PATCH] pg_bsd_indent: improve formatting of multiline comments
In-Reply-To: <aTxBcklpZcHAUAi1@nathan>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox