Re: char field <> or != to a value does not select where field is null ???

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: char field <> or != to a value does not select where field is null ???
Дата
Msg-id 1293.1127410697@sss.pgh.pa.us
обсуждение исходный текст
Ответ на char field <> or != to a value does not select where field is null ???  (Douglas Toltzman <doug@oakstreetsoftware.com>)
Список pgsql-bugs
Douglas Toltzman <doug@oakstreetsoftware.com> writes:
> It was my understanding that a NULL value would be not-equal to any
> non-null value.  Am I wrong about this?

Yes.  A NULL is neither equal nor unequal to anything else.

You can use IS DISTINCT FROM to get the behavior you are looking for,
but it might be better to rethink how you are using NULL.

            regards, tom lane

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

Предыдущее
От: Douglas Toltzman
Дата:
Сообщение: char field <> or != to a value does not select where field is null ???
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: BUG #1883: Renaming a schema leaves inconsistent sequence