Re: BUG #5702: pg fails to use a conditional index even the where clause matches the condition
От
Tom Lane
Тема
Re: BUG #5702: pg fails to use a conditional index even the where clause matches the condition
Дата
Msg-id
2193.1286684811@sss.pgh.pa.us
Ответ на
Список
Дерево обсуждения
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>
"Corin" writes:
> CREATE INDEX fanobjects_amazon_product_id_index
> ON fanobjects
> USING btree
> (amazon_product_id)
> WHERE NOT amazon_product_id IS NULL;
Try it like
WHERE amazon_product_id IS NOT NULL;
> I'd consider this a bug as "NOT x IS NULL" is the same as "x IS NOT NULL".
We don't expend an infinite number of cycles on rewriting different
query formulations into each other, and that's one of the ones we
don't handle ...
regards, tom laneВ списке pgsql-bugs по дате отправления
От: Corin
Дата:
От: Netskin | Corin Langosch
Дата: