Re: pgindent vs variable declaration across multiple lines

Andres Freund <andres@anarazel.de>

From: Andres Freund <andres@anarazel.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Thomas Munro <thomas.munro@gmail.com>, pgsql-hackers@postgresql.org
Date: 2023-01-22T22:40:34Z
Lists: pgsql-hackers
Hi,

On 2023-01-22 17:34:52 -0500, Tom Lane wrote:
> I spent some more time staring at this and came up with what seems like
> a workable patch, based on the idea that what we want to indent is
> specifically initialization expressions.

That's awesome. Thanks for doing that.


> Proposed patch for pg_bsd_indent attached.  I've also attached a diff
> representing the delta between what current pg_bsd_indent wants to do
> to HEAD and what this would do.  All the changes it wants to make look
> good, although I can't say whether there are other places it's failing
> to change that we'd like it to.

I think it's a significant improvement, even if it turns out that there's
other cases it misses.

Greetings,

Andres Freund



Commits

  1. Improve indentation of multiline initialization expressions.