Re: Equality operators on NULL values

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Bertrand Petit <pgsql-sql(at)phoe(dot)frmug(dot)org>
Cc: PostgreSQL-sql <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Equality operators on NULL values
Date: 2003-08-24 08:43:57
Message-ID: Pine.LNX.4.44.0308241041560.1170-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)gmx(dot)net

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Peter Eisentraut 2003-08-24 21:10:24 Re: Which cursor-related warnings should be errors?
Previous Message Bertrand Petit 2003-08-24 01:28:15 Equality operators on NULL values