Re: NULLs ;-) - Mailing list pgsql-general

From John D. Burger
Subject Re: NULLs ;-)
Date
Msg-id BA11E4CF-9E04-4F35-AFA2-81B81AB5D084@mitre.org
Whole thread Raw
In response to NULLs ;-)  (Scott Ribe <scott_ribe@killerbytes.com>)
Responses Re: NULLs ;-)  (Ragnar <gnari@hive.is>)
List pgsql-general
Scott Ribe wrote:

> 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)

although it's not as concise as one might wish.

- John D. Burger
   MITRE

pgsql-general by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: IN clause
Next
From: "Michael Nolan"
Date:
Subject: Re: How to increace nightly backup speed