Re: Fix a wrong comment in setrefs.c - Mailing list pgsql-hackers

From Richard Guo
Subject Re: Fix a wrong comment in setrefs.c
Date
Msg-id CAMbWs4_Pe4F8mHr8LKvBjH32GRW0cP-2TCCLdwuH+5K-oDr8pQ@mail.gmail.com
Whole thread Raw
In response to Re: Fix a wrong comment in setrefs.c  (Richard Guo <guofenglinux@gmail.com>)
Responses Re: Fix a wrong comment in setrefs.c
List pgsql-hackers

On Tue, Sep 26, 2023 at 9:51 AM Richard Guo <guofenglinux@gmail.com> wrote:
On Tue, Sep 26, 2023 at 5:45 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
I'm inclined to write the comment more like "Usually the equal()
check is redundant, but in setop plans it may not be, since
prepunion.c assigns ressortgroupref equal to the column resno
without regard to whether that matches the topmost level's
sortgrouprefs and without regard to whether any implicit coercions
are added in the setop tree.  We might have to clean that up someday;
but for now, just ignore any false matches."

+1.  It explains the situation much more clearly and accurately.

To make it easier to review, I've updated the patch to be so.

Thanks
Richard
Attachment

pgsql-hackers by date:

Previous
From: Alexander Lakhin
Date:
Subject: Re: Three commit tips
Next
From: Jeff Davis
Date:
Subject: Inconsistent use of "volatile" when accessing shared memory?