Re: Review - Patch for pg_bsd_indent: improve formatting of multiline comments

From: Álvaro Herrera <alvherre(at)kurilemu(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: solaimurugan vellaipandiyan <drsolaimurugan(dot)v(at)gmail(dot)com>, Aleksander Alekseev <aleksander(at)tigerdata(dot)com>, Payal Singh <payals1(at)umbc(dot)edu>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Review - Patch for pg_bsd_indent: improve formatting of multiline comments
Date: 2026-05-11 15:50:41
Message-ID: agH4sA9EUqkT4TaJ@alvherre.pgsql
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2026-May-10, Tom Lane wrote:

> Attached are a proposed v8 of the patch, plus two diff files showing
> the effects. v7-0001.diff.nocfbot is what the v7 patch does with
> today's HEAD (it's the same as before). The v8 patch makes all those
> changes and in addition makes the ones shown in v8-0001.diff.nocfbot.
> I think those are pretty much all improvements, except that it kind
> of messes up Martin Utesch's ASCII-art signatures in the geqo files.
> That's because there are some lines starting with '*' and some with
> '='. This is another place where I doubt it's worth the trouble to
> try to make pgindent handle the case nicely; I propose just manually
> adding leading '*'s to those comments before running pgindent.

Just passing by, but I think this comment should be handled manually as
well, as I doubt we want it to end up this way:

> diff --git a/src/backend/utils/adt/tsrank.c b/src/backend/utils/adt/tsrank.c
> index d35e5528d0a..6b4bf8eb13b 100644
> --- a/src/backend/utils/adt/tsrank.c
> +++ b/src/backend/utils/adt/tsrank.c
> @@ -337,12 +337,12 @@ calc_rank_or(const float *w, TSVector t, TSQuery q)
> }
> }
> /*
> - limit (sum(1/i^2),i=1,inf) = pi^2/6
> - resj = sum(wi/i^2),i=1,noccurrence,
> - wi - should be sorted desc,
> - don't sort for now, just choose maximum weight. This should be corrected
> - Oleg Bartunov
> -*/
> + * limit (sum(1/i^2),i=1,inf) = pi^2/6
> + * resj = sum(wi/i^2),i=1,noccurrence,
> + * wi - should be sorted desc,
> + * don't sort for now, just choose maximum weight. This should be corrected
> + * Oleg Bartunov
> + */
> res = res + (wjm + resj - wjm / ((jm + 1) * (jm + 1))) / 1.64493406685;
>
> entry++;

(Not that I understand what this is trying to tell me, mind)

--
Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/
"¿Cómo puedes confiar en algo que pagas y que no ves,
y no confiar en algo que te dan y te lo muestran?" (Germán Poo)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nisha Moond 2026-05-11 15:55:12 Re: pg_createsubscriber: Fix incorrect handling of cleanup flags
Previous Message Dmitry Dolgov 2026-05-11 15:50:01 Re: Add ssl_(supported|shared)_groups to sslinfo