Re: BUG #5702: pg fails to use a conditional index even the where clause matches the condition

Поиск
Список
Период
Сортировка
От Jeff Davis
Тема Re: BUG #5702: pg fails to use a conditional index even the where clause matches the condition
Дата
Msg-id 1286736534.8516.63.camel@jdavis
обсуждение исходный текст
Ответ на BUG #5702: pg fails to use a conditional index even the where clause matches the condition  ("Corin" <info@netskin.com>)
Ответы Re: BUG #5702: pg fails to use a conditional index even the where clause matches the condition
Список pgsql-bugs
On Sat, 2010-10-09 at 23:28 +0000, Corin wrote:
> I'd consider this a bug as "NOT x IS NULL" is the same as "x IS NOT NULL".

That is false.

http://thoughts.j-davis.com/2009/08/02/what-is-the-deal-with-nulls/

"NOT x IS NULL is not the same as x IS NOT NULL — If x is ROW(1,NULL),
then the former will evaluate to TRUE, and the latter will evaluate to
FALSE. Enjoy."

=> select ROW(1, NULL) IS NOT NULL;
 ?column?
----------
 f
(1 row)

=> select NOT ROW(1, NULL) IS NULL;
 ?column?
----------
 t
(1 row)


Regards,
    Jeff Davis

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Netskin | Corin Langosch
Дата:
Сообщение: Re: BUG #5702: pg fails to use a conditional index even the where clause matches the condition
Следующее
От: David Newall
Дата:
Сообщение: rollback to savepoint leads to transaction already in progress