pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jinhui Lai <jinhui-lai@foxmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-bugs <pgsql-bugs@lists.postgresql.org>
Subject: Re: BUG #18997: Two equivalent queries return different results
Date: Fri, 25 Jul 2025 01:49:54 +0800
Message-ID: <tencent_BBFD8437694FAE97171CF0D6079A261A5809@qq.com> (raw)
In-Reply-To: <1672783.1753378416@sss.pgh.pa.us>
References: <18997-5da9d229e6f13364@postgresql.org>
	<1672783.1753378416@sss.pgh.pa.us>

Dear Tom Lane,


Sorry for my careless. I check my PG version again, it is&nbsp; 17.4. Since my PG docker' tag is latest, I mistakenly thought it was the latest version (17.5).


Thanks for your reply.


Best regards,


Jinhui


         原始邮件
         
       
发件人:Tom Lane <tgl@sss.pgh.pa.us&gt;
发件时间:2025年7月25日 01:33
收件人:jinhui-lai <jinhui-lai@foxmail.com&gt;
抄送:pgsql-bugs <pgsql-bugs@lists.postgresql.org&gt;
主题:Re: BUG #18997: Two equivalent queries return different results



       PG&nbsp;Bug&nbsp;reporting&nbsp;form&nbsp;<noreply@postgresql.org&gt;&nbsp;writes:
&gt;&nbsp;I&nbsp;think&nbsp;these&nbsp;"SELECT&nbsp;COUNT(c0)&nbsp;FILTER&nbsp;(WHERE&nbsp;c0&nbsp;IS&nbsp;NOT&nbsp;NULL)&nbsp;FROM&nbsp;t0"&nbsp;and
&gt;&nbsp;"SELECT&nbsp;COUNT(c0)&nbsp;FROM&nbsp;t0&nbsp;WHERE&nbsp;c0&nbsp;IS&nbsp;NOT&nbsp;NULL;"&nbsp;are&nbsp;equivalent.&nbsp;However,
&gt;&nbsp;their&nbsp;results&nbsp;are&nbsp;different.

You&nbsp;sure&nbsp;your&nbsp;server&nbsp;is&nbsp;17.5,&nbsp;and&nbsp;not&nbsp;something&nbsp;a&nbsp;little&nbsp;older?
There&nbsp;was&nbsp;a&nbsp;bug&nbsp;of&nbsp;this&nbsp;sort&nbsp;in&nbsp;earlier&nbsp;17.x&nbsp;releases,&nbsp;but
we&nbsp;fixed&nbsp;it&nbsp;in&nbsp;17.5.&nbsp;&nbsp;For&nbsp;me,&nbsp;both&nbsp;queries&nbsp;produce&nbsp;"0"&nbsp;as
expected.

			regards, tom&nbsp;lane

view thread (3+ messages)

Message-ID: <tencent_BBFD8437694FAE97171CF0D6079A261A5809@qq.com>
Permalink:  ../tencent_BBFD8437694FAE97171CF0D6079A261A5809@qq.com/
Also on:    postgresql.org/message-id/tencent_BBFD8437694FAE97171CF0D6079A261A5809@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: jinhui-lai@foxmail.com, tgl@sss.pgh.pa.us, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #18997: Two equivalent queries return different results
  In-Reply-To: <tencent_BBFD8437694FAE97171CF0D6079A261A5809@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