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 1vWgg7-007Sg7-34 for pgsql-hackers@arkaria.postgresql.org; Fri, 19 Dec 2025 20:02:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vWgg4-008ymy-2I for pgsql-hackers@arkaria.postgresql.org; Fri, 19 Dec 2025 20:02:17 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vWgg4-008ymp-1I for pgsql-hackers@lists.postgresql.org; Fri, 19 Dec 2025 20:02:17 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vWgg3-001Yp5-1c for pgsql-hackers@lists.postgresql.org; Fri, 19 Dec 2025 20:02:16 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=momjian.us; s=2025010100; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description; bh=vVE3LZmwFLxeQ7aJ/PZMJ3OV1UdsuK3RkjPVws8hVrc=; b=aPDTi UOG+Go0pjL1hFvaqxb4WjI+nee6Dv4CQPxd7s4QDd9tcRXbGz+EF87QUcPXe1hQubOpTb7wrMqzC+ 2XqBG5uH5EhkV9SjnrJvDOaVD5NktO6DqKJBVvw+87zmbzJeqrpUGTW4V1dMXlBI50HMEka0mpucX K8CrM4vH0KziYnirINVjBFWLf/2esNH1osSqe4KuDvU6ajOtV1ub8Nc3O2MgymhOuYrN1RtwzMtdz zhW4JegI3jtKDAubDIzfQ1mTSlKZKc8QPJJNgXmq3KylXgIkuIPu08Ssv/nZsijdTl1Z/Rs/vBtpo nHDqnTUGlm4lWYY+IkJibcwHjkTiA==; Received: from bruce by momjian.us with local (Exim 4.98.2) (envelope-from ) id 1vWgg0-0000000803S-1ZaS; Fri, 19 Dec 2025 15:02:12 -0500 Date: Fri, 19 Dec 2025 15:02:12 -0500 From: Bruce Momjian To: Tom Lane Cc: =?utf-8?Q?=C3=81lvaro?= Herrera , Aleksander Alekseev , PostgreSQL Hackers , Nathan Bossart , Chao Li , Arseniy Mukhin , Michael Paquier Subject: Re: [PATCH] pg_bsd_indent: improve formatting of multiline comments Message-ID: References: <202512121547.dwkzxcs56227@alvherre.pgsql> <1000974.1765556221@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1000974.1765556221@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, Dec 12, 2025 at 11:17:01AM -0500, Tom Lane wrote: > =?utf-8?Q?=C3=81lvaro?= Herrera 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. Yes, this is why we had to wrap the pg_bsd_indent call in Perl. -- Bruce Momjian https://momjian.us EDB https://enterprisedb.com Do not let urgent matters crowd out time for investment in the future.