Dear PostgreSQL Development Team,
Thanks for your reply. But I don't believe this optimization is meaningless. Let me illustrate with two examples:
Example 1: Users inevitably make mistakes when writing SQL, such as accidentally writing WHERE a1=2
instead of WHERE 1=2
.
Example 2: Some automated testing tools may randomly generate similar cases.
If PostgreSQL can optimize for such scenarios, it would save users significant time and effort. Similar issues have been found in MySQL and MariaDB, where they have been acknowledged and addressed — in fact, MariaDB has already fixed such problems.
As a loyal PostgreSQL user, I sincerely hope these issues can be addressed to make PostgreSQL even better.
Best regards,
发件人:David G. Johnston <david.g.johnston@gmail.com> 发件时间:2025年4月28日 01:34 收件人:jh.lai@qq.com <jh.lai@qq.com>, pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org> 主题:Re: BUG #18905: The opposite WHERE clause intersects and is always anempty set. It should perform no action. |
On Sunday, April 27, 2025, PG Bug reporting form <
noreply@postgresql.org> wrote:
The following bug has been logged on the website:
Bug reference: 18905
Logged by: jinhui lai
Email address: jh.lai@qq.com
PostgreSQL version: 17.4
Operating system: ubuntu 22.04
Description:
As with 18904, this is not a bug.
David J.