Re: BUG #17545: Incorrect selectivity for IS NOT DISTINCT FROM and NULLs - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #17545: Incorrect selectivity for IS NOT DISTINCT FROM and NULLs
Date
Msg-id 1385220.1657600906@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #17545: Incorrect selectivity for IS NOT DISTINCT FROM and NULLs  (Richard Guo <guofenglinux@gmail.com>)
List pgsql-bugs
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



pgsql-bugs by date:

Previous
From: Richard Guo
Date:
Subject: Re: BUG #17545: Incorrect selectivity for IS NOT DISTINCT FROM and NULLs
Next
From: David Rowley
Date:
Subject: Reducing chunk header sizes on all memory context types