Re: slow IN() clause for many cases

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: slow IN() clause for many cases
Дата
Msg-id 29616.1129390292@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: slow IN() clause for many cases  (mark@mark.mielke.cc)
Список pgsql-hackers
mark@mark.mielke.cc writes:
> But doesn't "x IN (NULL)" already fail to ever match, similar to "x
> = NULL"? (Assuming that compatibility switch isn't enabled)

The case I'm worried about is "x IN (1,2,NULL)".  This *can* match.

Also, it's supposed to return NULL (not FALSE) if it doesn't match.
So simply discarding NULLs before we build the array wouldn't give
the right answer.

Considering that allowing null array entries has been a big wishlist
item for many years, I don't think that anyone will object to fixing
that in 8.2, anyway ...
        regards, tom lane


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

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: drop if exists
Следующее
От: Tom Lane
Дата:
Сообщение: Re: drop if exists