Re: Equality operators on NULL values - Mailing list pgsql-sql

From Peter Eisentraut
Subject Re: Equality operators on NULL values
Date
Msg-id Pine.LNX.4.44.0308241041560.1170-100000@peter.localdomain
Whole thread Raw
In response to Equality operators on NULL values  (Bertrand Petit <pgsql-sql@phoe.frmug.org>)
List pgsql-sql
Bertrand Petit writes:

>         NULL=NULL ==> t
>         1=NULL    ==> NULL (or anything else as long as it is not t)
>         1=1       ==> t
>         1=2       ==> f

>     Is there a stock replacement operator that would behave like
> the second truth table?

No, but why not write

(a = b) or (a is null and b is null)

-- 
Peter Eisentraut   peter_e@gmx.net



pgsql-sql by date:

Previous
From: Bertrand Petit
Date:
Subject: Equality operators on NULL values
Next
From: Jamie Lawrence
Date:
Subject: Re: Auto-update a field when record is changed