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

Поиск
Список
Период
Сортировка
От Corey Huinker
Тема Re: BUG #13464: Optimizer fails to use partial index on boolean when selected via "IS" operator.
Дата
Msg-id CADkLM=dm8UBb+_5ujDWgq1TtxucMZiH_hDLRMRpbOCr9kGLesQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #13464: Optimizer fails to use partial index on boolean when selected via "IS" operator.  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Re: windows 8 RTM compatibility issue (could not reserve shared memory region for child)
Следующее
От: Noah Misch
Дата:
Сообщение: Re: Re: windows 8 RTM compatibility issue (could not reserve shared memory region for child)