pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: 赖锦辉 <jh.lai@qq.com>
To: David G. Johnston <david.g.johnston@gmail.com>
To: pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>
Subject: Re: BUG #18905: The opposite WHERE clause intersects and is always an empty set. It should perform no action.
Date: Mon, 28 Apr 2025 01:54:16 +0800
Message-ID: <tencent_47C0CAC405AB8FF03DADC3B5ED82151EF506@qq.com> (raw)
In-Reply-To: <CAKFQuwZQB2=CRdqd1rT8cs+ziUjnDCbbnNot-UzyMBypDUkA+A@mail.gmail.com>
References: <18905-f17e775841805cda@postgresql.org>
	<CAKFQuwZQB2=CRdqd1rT8cs+ziUjnDCbbnNot-UzyMBypDUkA+A@mail.gmail.com>

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:&nbsp;Users inevitably make mistakes when writing SQL, such as accidentally writing WHERE a1=2&nbsp;instead of WHERE 1=2.
 Example 2:&nbsp;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&gt;
发件时间:2025年4月28日 01:34
收件人:jh.lai@qq.com <jh.lai@qq.com&gt;, pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org&gt;
主题: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&gt; wrote:
The following bug has been logged on the website:
 
 Bug reference:&nbsp; &nbsp; &nbsp; 18905
 Logged by:&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; jinhui lai
 Email address:&nbsp; &nbsp; &nbsp; jh.lai@qq.com
 PostgreSQL version: 17.4
 Operating system:&nbsp; &nbsp;ubuntu 22.04
 Description:&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
 

As with 18904, this is not a bug.


David J.

view thread (4+ messages)  latest in thread

Message-ID: <tencent_47C0CAC405AB8FF03DADC3B5ED82151EF506@qq.com>
Permalink:  ../tencent_47C0CAC405AB8FF03DADC3B5ED82151EF506@qq.com/
Also on:    postgresql.org/message-id/tencent_47C0CAC405AB8FF03DADC3B5ED82151EF506@qq.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: jh.lai@qq.com, david.g.johnston@gmail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #18905: The opposite WHERE clause intersects and is always an empty set. It should perform no action.
  In-Reply-To: <tencent_47C0CAC405AB8FF03DADC3B5ED82151EF506@qq.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox