| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | 孙诗浩(思才) <sunshihao(dot)ssh(at)alibaba-inc(dot)com> |
| Cc: | "PostgreSQL Hackers" <pgsql-hackers(at)lists(dot)postgresql(dot)org>, 范孝剑(康贤) <funnyxj(dot)fxj(at)alibaba-inc(dot)com> |
| Subject: | Re: use-regular-expressions-to-simplify-less_greater-and-not_equals.patch |
| Date: | 2021-08-11 03:36:15 |
| Message-ID: | 3936135.1628652975@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
"=?UTF-8?B?5a2Z6K+X5rWpKOaAneaJjSk=?=" <sunshihao(dot)ssh(at)alibaba-inc(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Dilip Kumar | 2021-08-11 03:47:16 | Re: Support reset of Shared objects statistics in "pg_stat_reset" function |
| Previous Message | 孙诗浩 (思才) | 2021-08-11 03:27:23 | use-regular-expressions-to-simplify-less_greater-and-not_equals.patch |