Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vU81F-0003AN-2F for pgsql-hackers@arkaria.postgresql.org; Fri, 12 Dec 2025 18:37:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vU81C-008xV6-24 for pgsql-hackers@arkaria.postgresql.org; Fri, 12 Dec 2025 18:37:31 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vU81C-008xUx-17 for pgsql-hackers@lists.postgresql.org; Fri, 12 Dec 2025 18:37:31 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vU81A-000P1o-1t for pgsql-hackers@lists.postgresql.org; Fri, 12 Dec 2025 18:37:30 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 5BCIbNWF1029570; Fri, 12 Dec 2025 13:37:23 -0500 From: Tom Lane To: Nathan Bossart cc: =?utf-8?Q?=C3=81lvaro?= Herrera , Aleksander Alekseev , PostgreSQL Hackers , Chao Li , Arseniy Mukhin , Bruce Momjian , Michael Paquier Subject: Re: [PATCH] pg_bsd_indent: improve formatting of multiline comments In-reply-to: References: <202512121547.dwkzxcs56227@alvherre.pgsql> <1000974.1765556221@sss.pgh.pa.us> Comments: In-reply-to Nathan Bossart message dated "Fri, 12 Dec 2025 10:23:14 -0600" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1029568.1765564643.1@sss.pgh.pa.us> Date: Fri, 12 Dec 2025 13:37:23 -0500 Message-ID: <1029569.1765564643@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Nathan Bossart writes: > 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. There's something to be said for that approach. Presumably, a rewrite could be smaller because we wouldn't need to support all the options bsd_indent has, just the behavior PG wants. I wonder whether it'd be possible to get rid of the need for typedefs.list while at it. That might be impractical --- IIRC, C syntax is ambiguous if you don't know which identifiers are typedefs. Still, I believe there are other indenters that get away without that knowledge, so maybe the ambiguity isn't fatal for indentation purposes. With or without that nice-to-have, it'd be a lot of work with not all that much payoff, so I'm finding it hard to recommend that somebody go after this. But maybe someone will find it irresistible to scratch that itch. regards, tom lane