Re: Improve pgindent's formatting named fields in struct literals and varidic functions
Chao Li <li.evan.chao@gmail.com>
From: Chao Li <li.evan.chao@gmail.com>
To: Andreas Karlsson <andreas@proxel.se>
Cc: Jelte Fennema-Nio <postgres@jeltef.nl>,
pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2026-03-31T08:31:37Z
Lists: pgsql-hackers
> On Mar 31, 2026, at 16:03, Andreas Karlsson <andreas@proxel.se> wrote: > > On 3/31/26 9:16 AM, Jelte Fennema-Nio wrote: >> On Tue, 31 Mar 2026 at 08:30, Andreas Karlsson <andreas@proxel.se> wrote: >>> Rebased it again. >> I agree this looks better. So seems like a reasonable improvement. > > Thanks for taking a look! > > But noticed now that the tests were broken so here is a new version where they pass and where I also added a new test case for struct literals with named fields. > > Andreas > <v4-0001-Make-pgindent-add-a-space-between-comma-and-perio.patch><v4-0002-Run-pgindent-add-a-space-between-comma-and-period.patch> I applied the patch and played with it a little bit. I didn’t find any problem. The patch idea looks reasonable to me, after a comma, dot is no longer acting as structure member access, so inserting a white space feels good. I saw a couple of typos in the commit message: varidic -> variadic treaing -> treating Overall, looks good to me. Best regards, -- Chao Li (Evan) HighGo Software Co., Ltd. https://www.highgo.com/
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Make pg_bsd_indent add a space between comma and period.
- b518ba4affed 19 (unreleased) landed