pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nathan Bossart <nathandbossart@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Chao Li <li.evan.chao@gmail.com>
Cc: Rahila Syed <rahilasyed90@gmail.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: pgindent versus struct members and typedefs
Date: Wed, 6 May 2026 09:44:26 -0500
Message-ID: <aftTyjC_xWp-n30S@nathan> (raw)
In-Reply-To: <729177.1778039019@sss.pgh.pa.us>
References: <aS9hkwnkWf3dZIA_@nathan>
	<347EA055-D626-414C-B10D-7E70041B9B55@gmail.com>
	<509793.1764715875@sss.pgh.pa.us>
	<afplW8DvRONDc1yl@nathan>
	<729177.1778039019@sss.pgh.pa.us>

On Tue, May 05, 2026 at 11:43:39PM -0400, Tom Lane wrote:
> Nathan Bossart <nathandbossart@gmail.com> 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





view thread (22+ messages)  latest in thread

Message-ID: <aftTyjC_xWp-n30S@nathan>
Permalink:  ../aftTyjC_xWp-n30S@nathan/
Also on:    postgresql.org/message-id/aftTyjC_xWp-n30S@nathan

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: nathandbossart@gmail.com, tgl@sss.pgh.pa.us, li.evan.chao@gmail.com, rahilasyed90@gmail.com, robertmhaas@gmail.com, pgsql-hackers@lists.postgresql.org
  Subject: Re: pgindent versus struct members and typedefs
  In-Reply-To: <aftTyjC_xWp-n30S@nathan>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox