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 1wKdUJ-001CcC-1F for pgsql-hackers@arkaria.postgresql.org; Wed, 06 May 2026 14:44:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wKdUH-00HQ76-2H for pgsql-hackers@arkaria.postgresql.org; Wed, 06 May 2026 14:44:33 +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 1wKdUH-00HQ6y-1K for pgsql-hackers@lists.postgresql.org; Wed, 06 May 2026 14:44:33 +0000 Received: from mail-qk1-x729.google.com ([2607:f8b0:4864:20::729]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wKdUF-00000000q2P-0mnL for pgsql-hackers@lists.postgresql.org; Wed, 06 May 2026 14:44:33 +0000 Received: by mail-qk1-x729.google.com with SMTP id af79cd13be357-8ef0ba61d46so729323985a.2 for ; Wed, 06 May 2026 07:44:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1778078669; x=1778683469; darn=lists.postgresql.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=MlRO9tFuoHkpSX+RuA99P7o2guQuOm3ZSDgIMYdWeKk=; b=IwI4qy3RYOknmiMVrG+F9+zD77hD+nyRAadL/rtWtcj9oQv54/HHsQQeF3DeBsw/Pe f/PUJOqJ7bEwLByLd+AWNHh456QyoFuAHPg75fZ28OYb8M11QcMJ493SF2BzTbFe5RDs az8HQMArLzRR2ltfv6XHt6bXasm0Ti1gLEcoqrgzsjoN800RGm0X6lHbT1xpphyrqVjV EQcsvPMdO+uFxIReNjhILb5JXJEC2HuGbMXZgxI2KjgdcURJStLyant2Le93uYDxQDy8 MMN44+oo53ZEDLCQaMJLabmlkLAkmXeFlcUcVcFsSrB381HBnK0aew7crFDZg6cmPsBA 7l0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778078669; x=1778683469; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MlRO9tFuoHkpSX+RuA99P7o2guQuOm3ZSDgIMYdWeKk=; b=lvmRYa4NykgyjceamEzjOAGMef/k6dAMss4YgnUcAwefZaf6t/s+tkRqMHECFQ+gXD ebJ1AzGDmjGITc1wFbBWsvJC+XxW8uQ2JYOSEmLK3zmyddcK1CW5Kskk4wbDHoDVNvxi 8GpXJrWx1GJOUe1gm0MGat3ifV9unmZGO9DvJ7pxqU15bB7+MHPnYrbaWDAzNyxR+k+L ocMS+m4TQGeEJwxKgWXXzAjKVembFShFAnuDY0Yn0tLYN7OMQp8p+dRkCRrF66112XFl KF78tGeh52oKSog1mYdlR0tqeCsCSu4bS7tw6hWRjFWXwqwfUECseZwrLvBIQZQV4EDI 7u2g== X-Forwarded-Encrypted: i=1; AFNElJ/8vocTOuk9kLtl+OuoYpqugFy4SGeIb+qNy642g34lTHYmnn+4JwoJpOu6Lg/j37ohHmFmj6zZbdfJzSyJ@lists.postgresql.org X-Gm-Message-State: AOJu0Yy0+J7zrcY5a8HsNPWqBngcp+yamv08krgiqebmFbafJ51WazP3 zCxk2v0cgICpvqsGkKiRCeQtX8EIyEdJThy6LaQUabkH19MuhQ5uj+yL X-Gm-Gg: AeBDiesZNB9iV0u3YHj/0Spit9x6poKWe1CoroKhSV9wuXWo0ku6UTKdvzLDW3vvge2 JihQIYKjM4KuMaXpQ/TwqVdrpaGK5Fzu3witNK0j9GxHM+tBDZ6W31QDpH4267xfrL9WA3b0VWR uM1hOjCDaZLgFY0RPq5+GYtsqFaY0t89f1c/CzFGi+5245JTtUs+KxbUf7JHYNdyOgyyQYS1TXj plegou8mnhsBFSrzI9GoULgAM9uG7Zb4ya6LoubtvMqdufba3Lxj6kqfBADnbm0D2q9tHlowshK xtZ/1CtTjxzMEaIrO7mvhTwm/m+GNFvC7047BXtObTacsuEwa/Ds/FuuNTWcSzkN3oltr4eWEAJ JmwQ/RpZXyKHN3ObgXESsbq+jdmFiX15k5Y7pqpT011OauNpbLUsQEP9PChFUEGEVrPmJwXClXI RDuz5K7pqTXjCMywpEF/uAsh9U3gzoGaaJkXKZmiMx+iRZPWa9SvZKQ99HjwSgF6wpbMehWuYw4 sbnQ0+izGVLnbcb3mOpDHqIvhiGDSG/ X-Received: by 2002:a05:620a:698a:b0:8eb:10d4:a46c with SMTP id af79cd13be357-904d5ff5a54mr542647885a.35.1778078669084; Wed, 06 May 2026 07:44:29 -0700 (PDT) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id af79cd13be357-8fc293816e8sm1616577485a.8.2026.05.06.07.44.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 May 2026 07:44:28 -0700 (PDT) Date: Wed, 6 May 2026 09:44:26 -0500 From: Nathan Bossart To: Tom Lane Cc: Chao Li , Rahila Syed , Robert Haas , PostgreSQL Hackers Subject: Re: pgindent versus struct members and typedefs Message-ID: References: <347EA055-D626-414C-B10D-7E70041B9B55@gmail.com> <509793.1764715875@sss.pgh.pa.us> <729177.1778039019@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <729177.1778039019@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, May 05, 2026 at 11:43:39PM -0400, Tom Lane wrote: > 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?) The upstream fix is from before we forked, it just didn't fix this particular case. I don't see any missing changes from pstef/freebsd_indent, but there have been a number of changes in the FreeBSD version: https://cgit.freebsd.org/src/log/usr.bin/indent Some of our changes to pg_bsd_indent bumped INDENT_VERSION. Should we do that here? -- nathan