Re: NULLs ;-)

From: "John D(dot) Burger" <john(at)mitre(dot)org>
To: pgsql general <pgsql-general(at)postgresql(dot)org>
Subject: Re: NULLs ;-)
Date: 2006-11-28 18:59:05
Message-ID: BE9B62D3-5DA0-4577-8184-20256CB036DE@mitre.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2006-11-28 19:01:34 Re: How to implement backup protocol
Previous Message Richard Huxton 2006-11-28 18:56:37 Re: Editing contrib modules which are loaded by default?