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 1wKTAw-0010yB-0n for pgsql-hackers@arkaria.postgresql.org; Wed, 06 May 2026 03:43:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wKTAt-00EgS3-1f for pgsql-hackers@arkaria.postgresql.org; Wed, 06 May 2026 03:43:51 +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 1wKTAt-00EgRv-0l for pgsql-hackers@lists.postgresql.org; Wed, 06 May 2026 03:43:51 +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.98.2) (envelope-from ) id 1wKTAq-00000000l3t-3Mo7 for pgsql-hackers@lists.postgresql.org; Wed, 06 May 2026 03:43:50 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.18.1/8.18.1) with ESMTP id 6463hdZN729178; Tue, 5 May 2026 23:43:39 -0400 From: Tom Lane To: Nathan Bossart cc: Chao Li , Rahila Syed , Robert Haas , PostgreSQL Hackers Subject: Re: pgindent versus struct members and typedefs In-reply-to: References: <347EA055-D626-414C-B10D-7E70041B9B55@gmail.com> <509793.1764715875@sss.pgh.pa.us> Comments: In-reply-to Nathan Bossart message dated "Tue, 05 May 2026 16:47:07 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <729176.1778039019.1@sss.pgh.pa.us> Date: Tue, 05 May 2026 23:43:39 -0400 Message-ID: <729177.1778039019@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Nathan Bossart writes: > For fun, I spent some time with an AI tool to develop the attached fix for > this problem. The explanation seems reasonable to me, although I am by no > means a pgindent expert. When I looked at this in December, I did find > this similar commit from upstream [0], but I failed to make the connection > with last_u_d. 0002 is the result of a pgindent run after applying 0001. > You'll notice that it fixes the exact set of cases I found with grep > upthread. Those changes are clearly improvements. I'm too tired to investigate right now, but I wonder if we should adopt the upstream fix you mention? (Or more generally, other changes they made since we forked?) regards, tom lane