Re: [PATCH] pg_bsd_indent: improve formatting of multiline comments

From: Aleksander Alekseev <aleksander(at)tigerdata(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Nathan Bossart <nathandbossart(at)gmail(dot)com>, Álvaro Herrera <alvherre(at)kurilemu(dot)de>, Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>, Arseniy Mukhin <arseniy(dot)mukhin(dot)dev(at)gmail(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, Michael Paquier <michael(at)paquier(dot)xyz>
Subject: Re: [PATCH] pg_bsd_indent: improve formatting of multiline comments
Date: 2025-12-12 21:47:30
Message-ID: CAJ7c6TPztZV=07UwQ+GAgj4i+aUfpu0W8CF0K28VKZM+G4nfjA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

> It's strange to see this thread go on about messing with the Perl script
> because we're too afraid of pg_bsd_indent. Maybe we should take
> ownership of that code -- improve its own indentation to our
> conventions, add comments, rename unclear variables, and so on until we
> have something we can work with, and fix these weird bugs and
> idiosincratic behaviors we don't like. I just found out this code dates
> back from 1976.

> With or without that nice-to-have, it'd be a lot of work with
> not all that much payoff, so I'm finding it hard to recommend
> that somebody go after this. But maybe someone will find it
> irresistible to scratch that itch.

I was thinking just recently that rewriting pgindent in Python might
be a good idea for future refactoring, but probably only if and after
we merge PyTest patchset [1]. (Which strangely enough is missing on
the nearest open commitfest.)

[1]: https://www.postgresql.org/message-id/flat/CAOYmi%2BkThkM9Z87u%3DR_Wi7fCor2i%2BUZKAyq0UCyprzCwTQvqgA%40mail.gmail.com
--
Best regards,
Aleksander Alekseev

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Sami Imseih 2025-12-12 21:56:07 Re: Proposal: Add a callback data parameter to GetNamedDSMSegment
Previous Message Nathan Bossart 2025-12-12 21:07:22 Re: Proposal: Add a callback data parameter to GetNamedDSMSegment