]> git.ipfire.org Git - thirdparty/postgresql.git/commit
De-obfuscate the comment in tsrank.c's calc_rank_or().
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 12 May 2026 19:04:42 +0000 (15:04 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 12 May 2026 19:21:36 +0000 (15:21 -0400)
commit163f20ca12a9f83aff68c47e9ab94f0856800dd5
tree35c88790da5833053f884884c1d28f157ab5c216
parent06fccab4c61b4c3555fbbdb9da1290bcde1ddb50
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@tigerdata.com>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/CAJ7c6TO0xvunpeOv89i1eKQBhKF9=GEETkTz+yAGs1xGYH25MQ@mail.gmail.com
src/backend/utils/adt/tsrank.c