Re: Fix incorrect comments in tuplesort.c - Mailing list pgsql-hackers

From David G. Johnston
Subject Re: Fix incorrect comments in tuplesort.c
Date
Msg-id CAKFQuwZpZgM56m0F0oWTRZibte6nRkiTEPsrntUPTJRxcHL3=g@mail.gmail.com
Whole thread Raw
In response to Re: Fix incorrect comments in tuplesort.c  ("cca5507" <cca5507@qq.com>)
Responses Re: Fix incorrect comments in tuplesort.c
List pgsql-hackers
On Saturday, December 6, 2025, cca5507 <cca5507@qq.com> wrote:
Hi Chao,

Thank you for your reply.

I feed the comment to Github Copilot and he says it's incorrect. The "slightly" is just what he suggests.

Your suggestion also LGTM.

I don’t think just adding the word “slightly” is a good fix here.  Moving the comment from line 695 here would be better as that explains and gives reference to why the formula is used, close to the formula itself.  It feels like the identical comment at line 757 also is just a bad copy-paste outcome and should be removed and probably replaced with one describing the complicated conditional code it precedes.

David J.

pgsql-hackers by date:

Previous
From: "cca5507"
Date:
Subject: Re: Fix incorrect comments in tuplesort.c
Next
From: Kirill Reshke
Date:
Subject: Re: WIP - xmlvalidate implementation from TODO list