Re: NULLs ;-)

Поиск
Список
Период
Сортировка
От John D. Burger
Тема Re: NULLs ;-)
Дата
Msg-id BE9B62D3-5DA0-4577-8184-20256CB036DE@mitre.org
обсуждение исходный текст
Ответ на Re: NULLs ;-)  (Ragnar <gnari@hive.is>)
Список pgsql-general
>>> where a <> b or (a is null and b is not null) or (a is not null
>>> and b is null)
>>
>> In the absence of IS DISTINCT FROM, I think this has the same
>> semantics:
>>
>>    where coalesce(a, b) <> coalesce(b, a)
>
> sorry, but no.

Argh, my expression is just nonsense - I was thinking of something like:

   coalesce(a, 'SOME MAGIC VALUE') <> coalesce(b, 'SOME MAGIC VALUE')

and wanted to make it work for any types.  Sigh.

- John D. Burger
   MITRE

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

Предыдущее
От: "Merlin Moncure"
Дата:
Сообщение: Re: Development of cross-platform GUI for Open Source DBs
Следующее
От: Richard Huxton
Дата:
Сообщение: Re: How to implement backup protocol