Re: BUG #13464: Optimizer fails to use partial index on boolean when selected via "IS" operator. - Mailing list pgsql-bugs

From Corey Huinker
Subject Re: BUG #13464: Optimizer fails to use partial index on boolean when selected via "IS" operator.
Date
Msg-id CADkLM=dm8UBb+_5ujDWgq1TtxucMZiH_hDLRMRpbOCr9kGLesQ@mail.gmail.com
Whole thread Raw
In response to Re: BUG #13464: Optimizer fails to use partial index on boolean when selected via "IS" operator.  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
Good to know. And yes, according to
http://www.postgresql.org/docs/9.4/static/functions-comparison.html IS TRUE
will never return null even if y is null.

I can't, however think of a case where the the partial index would lead to
an incorrect answer. Can you enlighten me?

On Tue, Jun 23, 2015 at 8:28 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

> corey.huinker@gmail.com writes:
> > Correct index is used on "WHERE y" and "WHERE y = true" but not "WHERE y
> IS
> > TRUE".
>
> y IS TRUE is not actually equivalent to the other two conditions ...
>
>                         regards, tom lane
>

pgsql-bugs by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Re: windows 8 RTM compatibility issue (could not reserve shared memory region for child)
Next
From: Noah Misch
Date:
Subject: Re: Re: windows 8 RTM compatibility issue (could not reserve shared memory region for child)