Re: Select .... where id not in (....) returns 0 incorrectly

Поиск
Список
Период
Сортировка
От Mladen Gogala
Тема Re: Select .... where id not in (....) returns 0 incorrectly
Дата
Msg-id 71a6ae74-79ca-09c6-2e9c-a7f4d86b176f@gmail.com
обсуждение исходный текст
Ответ на Re: Select .... where id not in (....) returns 0 incorrectly  ("J. Roeleveld" <joost@antarean.org>)
Ответы Re: Select .... where id not in (....) returns 0 incorrectly  ("Peter J. Holzer" <hjp-pgsql@hjp.at>)
Список pgsql-general
On 4/4/22 09:21, J. Roeleveld wrote:
This was actually the case, I forgot there is 1 NULL-value in that list.
Personally, I think NULL should be treated as a seperate value and not lead to 
strange behaviour.

NULL is strange. Relational databases use ternary, not binary logic. In the woke vernacular, one could say that Postgres is non-binary. NULL literally means "no value". It is a part of the standard, so we have to deal with it, Codd help us. However, based on my lifelong experience with Oracle, NULL values are bad and are best avoided. Postgres is more forgiving than Oracle because in Postgres, the condition "is not null" can be resolved by index. In Oracle, it can not.

-- 
Mladen Gogala
Database Consultant
Tel: (347) 321-1217
https://dbwhisperer.wordpress.com

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

Предыдущее
От: Michael Lewis
Дата:
Сообщение: Re: Serializable read only deferrable- implications
Следующее
От: "Peter J. Holzer"
Дата:
Сообщение: Re: Select .... where id not in (....) returns 0 incorrectly