Re: fixing typo in comment for restriction_is_or_clause - Mailing list pgsql-hackers

From Japin Li
Subject Re: fixing typo in comment for restriction_is_or_clause
Date
Msg-id MEYP282MB16690D52E52E024DCC49EF87B6319@MEYP282MB1669.AUSP282.PROD.OUTLOOK.COM
Whole thread Raw
In response to Re: fixing typo in comment for restriction_is_or_clause  (Richard Guo <guofenglinux@gmail.com>)
Responses Re: fixing typo in comment for restriction_is_or_clause  (Zhihong Yu <zyu@yugabyte.com>)
List pgsql-hackers
On Tue, 25 Oct 2022 at 10:48, Richard Guo <guofenglinux@gmail.com> wrote:
> On Tue, Oct 25, 2022 at 10:05 AM John Naylor <john.naylor@enterprisedb.com>
> wrote:
>
>>
>> On Tue, Oct 25, 2022 at 12:19 AM Zhihong Yu <zyu@yugabyte.com> wrote:
>> >
>> > Hi,
>> > When I was looking at src/backend/optimizer/util/restrictinfo.c, I found
>> a typo in one of the comments.
>>
>> Using "t" as an abbreviation for "true" was probably intentional, so not a
>> typo. There is no doubt what the behavior is.
>>
>> > I also took the chance to simplify the code a little bit.
>>
>> It's perfectly clear and simple now, even if it doesn't win at "code golf".
>>
>
> Agree with your point.  Do you think we can further make the one-line
> function a macro or an inline function in the .h file?  I think this
> function is called quite frequently during planning, so maybe doing that
> would bring a little bit of efficiency.
>

+1, same goes for restriction_is_securely_promotable.

--
Regrads,
Japin Li.
ChengDu WenWu Information Technology Co.,Ltd.




pgsql-hackers by date:

Previous
From: Richard Guo
Date:
Subject: Re: fixing typo in comment for restriction_is_or_clause
Next
From: Zhihong Yu
Date:
Subject: Re: fixing typo in comment for restriction_is_or_clause