pgsql: De-obfuscate the comment in tsrank.c's calc_rank_or().

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: De-obfuscate the comment in tsrank.c's calc_rank_or().
Date: 2026-05-12 19:21:50
Message-ID: E1wMsfu-000ErW-1L@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

De-obfuscate the comment in tsrank.c's calc_rank_or().

Oleg's original comment was intelligible only to him.
Aleksander has reverse-engineered what seems like a plausible
explanation of what the code is trying to do, so replace the
comment with that. (Also, re-order the final expression to
match the new comment.)

In passing, this makes the comment satisfy our usual formatting
conventions. pgindent has let it pass as-is so far, but planned
changes would mess it up without some sort of intervention.

Author: Aleksander Alekseev <aleksander(at)tigerdata(dot)com>
Reviewed-by: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Discussion: https://postgr.es/m/CAJ7c6TO0xvunpeOv89i1eKQBhKF9=GEETkTz+yAGs1xGYH25MQ@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/163f20ca12a9f83aff68c47e9ab94f0856800dd5

Modified Files
--------------
src/backend/utils/adt/tsrank.c | 39 +++++++++++++++++++++++++++++++--------
1 file changed, 31 insertions(+), 8 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian 2026-05-12 20:16:36 pgsql: doc PG 19 relnotes: add two optimizer hooks
Previous Message Bruce Momjian 2026-05-12 19:14:07 pgsql: doc PG 19 relnotes: remove "Optionally" for CPU optimizations