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 Jeff Davis <pgsql@j-davis.com>
Re: BUG #5702: pg fails to use a conditional index even the where clause matches the condition Tom Lane <tgl@sss.pgh.pa.us>
Re: BUG #5702: pg fails to use a conditional index even the where clause matches the condition Netskin | Corin Langosch <clangosch@netskin.com>
Re: BUG #5702: pg fails to use a conditional index even the where clause matches the condition Tom Lane <tgl@sss.pgh.pa.us>
Re: BUG #5702: pg fails to use a conditional index even the where clause matches the condition Netskin | Corin Langosch <clangosch@netskin.com>
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
Дата:
От: David Newall
Дата:
FAQ