From: | Aleksander Alekseev <aleksander(at)timescale(dot)com> |
---|---|
To: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Cc: | 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-06-23 10:42:32 |
Message-ID: | CAJ7c6TOGdVBK5P-s59c77qxaw=ydPjpzp_s3VbpHeHn3Gc1iyA@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi Arseniy,
Thanks for the feedback!
> Now it affects 4 times more files (380). What I noticed:
> 1) Most of the comments are bordered comments like this:
> -/* --------------------------------------------------------------------------------
> +/*
> + * --------------------------------------------------------------------------------
> * Public IO related functions operating on IO Handles
> * --------------------------------------------------------------------------------
> */
>
> Do we want to skip such comments?
> I have also seen comments with '====' border.
Personally I don't have a strong opinion on this. We can easily add an
exception for "/* ---" and "/* ===" comments if somebody believes this
is a problem. I choose not to add such an exception just yet only
because I don't like unnecessary exceptions :)
> 2) Some comments like this:
>
> before:
> /* Author: Linus Tolke
> (actually most if the code is "borrowed" from the distribution and just
> slightly modified)
> */
>
> after:
> /*
> * Author: Linus Tolke
> (actually most if the code is "borrowed" from the distribution and just
> slightly modified)
> */
>
> I guess closing */ on the separate line is the trigger?
> If I'm not wrong there are only 3 such comments, maybe it is easier to
> fix them by hand?)
>
> 3) It seems all geqo related file contains such comment:
> -/* contributed by:
> +/*
> + * contributed by:
> =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
> * Martin Utesch * Institute of
> Automatic Control *
You are right, these comments shouldn't have been changed. Apparently
the script is going to need slightly more complicated checks that I
initially thought.
Here is the corrected patch v4.
--
Best regards,
Aleksander Alekseev
Attachment | Content-Type | Size |
---|---|---|
v4-0001-pgindent-improve-formatting-of-multiline-comments.patch | application/octet-stream | 2.0 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Zhijie Hou (Fujitsu) | 2025-06-23 10:50:09 | RE: Conflict detection for update_deleted in logical replication |
Previous Message | shveta malik | 2025-06-23 10:02:42 | Re: POC: enable logical decoding when wal_level = 'replica' without a server restart |