Re: use-regular-expressions-to-simplify-less_greater-and-not_equals.patch - Mailing list pgsql-hackers

From Tom Lane
Subject Re: use-regular-expressions-to-simplify-less_greater-and-not_equals.patch
Date
Msg-id 3936135.1628652975@sss.pgh.pa.us
Whole thread Raw
In response to use-regular-expressions-to-simplify-less_greater-and-not_equals.patch  ("孙诗浩(思才)" <sunshihao.ssh@alibaba-inc.com>)
Responses Re: use-regular-expressions-to-simplify-less_greater-and-not_equals.patch
List pgsql-hackers
"=?UTF-8?B?5a2Z6K+X5rWpKOaAneaJjSk=?=" <sunshihao.ssh@alibaba-inc.com> writes:
>      we can use regular expressions (<>|!=) to cover "<>" and "!=". There is no
> need to have two definitions less_greater and not_equals, because it will confuse developer.
> So, we can use only not_equals to cover this operator set.

I do not find this an improvement.  Yeah, it's a bit shorter, but it's
less clear; not least because the comment explaining the <>-means-!=
behavior is no longer anywhere near the code that implements that
behavior.  It would also get in the way if we ever had reason to treat <>
and != as something other than exact equivalents.

            regards, tom lane



pgsql-hackers by date:

Previous
From: "孙诗浩(思才)"
Date:
Subject: use-regular-expressions-to-simplify-less_greater-and-not_equals.patch
Next
From: Dilip Kumar
Date:
Subject: Re: Support reset of Shared objects statistics in "pg_stat_reset" function