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(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> corey(dot)huinker(at)gmail(dot)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
>