Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pJMEC-0001GY-0O for pgsql-hackers@arkaria.postgresql.org; Sat, 21 Jan 2023 22:20:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pJMEA-0004YM-Ry for pgsql-hackers@arkaria.postgresql.org; Sat, 21 Jan 2023 22:20:46 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pJMEA-0004YD-Iz for pgsql-hackers@lists.postgresql.org; Sat, 21 Jan 2023 22:20:46 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pJME8-0005ZT-QA for pgsql-hackers@postgresql.org; Sat, 21 Jan 2023 22:20:46 +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 30LMKZVr1105402; Sat, 21 Jan 2023 17:20:35 -0500 From: Tom Lane To: Peter Geoghegan cc: Bruce Momjian , Jelte Fennema , Magnus Hagander , Alvaro Herrera , Stephen Frost , Noah Misch , Jesse Zhang , Andres Freund , PostgreSQL-development Subject: Re: run pgindent on a regular basis / scripted manner In-reply-to: References: <20200814202651.GA31108@alvherre.pgsql> <1097305.1674334785@sss.pgh.pa.us> Comments: In-reply-to Peter Geoghegan message dated "Sat, 21 Jan 2023 14:05:41 -0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1105400.1674339635.1@sss.pgh.pa.us> Date: Sat, 21 Jan 2023 17:20:35 -0500 Message-ID: <1105401.1674339635@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Peter Geoghegan writes: > Of course the way that I want to do things is (almost by definition) > the pgindent way, at least right now -- it's not necessarily about my > fixed preferences (though it can be hard to tell!). It's really not > surprising that clang-format cannot quite perfectly simulate pgindent. > How flexible can we be about stuff like that? Obviously there is no > clear answer right now. I don't feel wedded to every last detail of what pgindent does (and especially not the bugs). But I think if the new tool is not a pretty close match we'll be in for years of back-patching pain. We have made changes in pgindent itself in the past, and the patching consequences weren't *too* awful, but the changes weren't very big either. As I said upthread, this is really impossible to answer without a concrete proposal of how to configure clang-format and a survey of what diffs we'd wind up with. regards, tom lane