pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Richard Guo <guofenglinux@gmail.com>
Cc: rpsalmi@gmail.com, PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Subject: Re: BUG #17545: Incorrect selectivity for IS NOT DISTINCT FROM and NULLs
Date: Tue, 12 Jul 2022 00:41:46 -0400
Message-ID: <1385220.1657600906@sss.pgh.pa.us> (raw)
In-Reply-To: <CAMbWs4-qTRsTeNyHz0ouKkuSs8ct=rxO26pL1CNG1aGk2znvow@mail.gmail.com>
References: <17545-a0ca4de888953169@postgresql.org>
	<CAMbWs4-qTRsTeNyHz0ouKkuSs8ct=rxO26pL1CNG1aGk2znvow@mail.gmail.com>

Richard Guo <guofenglinux@gmail.com> writes:
> The comment in the codes has explained this behavior, as it says:
>     * This estimation method doesn't give the right behavior for nulls,
>     * but it's better than doing nothing.
> So maybe this is a known issue?

It's a nobodys-bothered-to-make-it-better issue.  In general, PG's
treatment of IS [NOT] DISTINCT FROM is pretty lame --- for example,
you might wish that IS NOT DISTINCT FROM could use an index in
the way that "=" can, but that's never been made to happen.

			regards, tom lane





view thread (9+ messages)  latest in thread

Message-ID: <1385220.1657600906@sss.pgh.pa.us>
Permalink:  ../1385220.1657600906@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1385220.1657600906@sss.pgh.pa.us

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, guofenglinux@gmail.com
  Subject: Re: BUG #17545: Incorrect selectivity for IS NOT DISTINCT FROM and NULLs
  In-Reply-To: <1385220.1657600906@sss.pgh.pa.us>
  References: <17545-a0ca4de888953169@postgresql.org> <CAMbWs4-qTRsTeNyHz0ouKkuSs8ct=rxO26pL1CNG1aGk2znvow@mail.gmail.com> <1385220.1657600906@sss.pgh.pa.us>

* 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