Re: NULLs ;-)

From: Scott Ribe <scott_ribe(at)killerbytes(dot)com>
To: Ragnar <gnari(at)hive(dot)is>, "John D(dot) Burger" <john(at)mitre(dot)org>
Cc: pgsql general <pgsql-general(at)postgresql(dot)org>
Subject: Re: NULLs ;-)
Date: 2006-11-28 19:28:44
Message-ID: C191DBFC.5C44B%scott_ribe@killerbytes.com
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.

So it would have to be where coalesce(a, b, 0) <> coalesce(b, a, 0) for your
example with ints, and likewise some default value for other column types...

--
Scott Ribe
scott_ribe(at)killerbytes(dot)com
http://www.killerbytes.com/
(303) 722-0567 voice

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Merlin Moncure 2006-11-28 19:38:18 Re: backend crash following load command
Previous Message Vivek Khera 2006-11-28 19:19:08 Re: How to increace nightly backup speed