Re: why the need for is null?

From: Baldur Norddahl <bbn-pgsql(dot)general(at)clansoft(dot)dk>
To: Martijn van Oosterhout <kleptog(at)svana(dot)org>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: why the need for is null?
Date: 2004-01-01 22:53:29
Message-ID: 1072997609.3ff4a4e90800a@localhost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Quoting Martijn van Oosterhout <kleptog(at)svana(dot)org>:

> Because in trivalued logic, <anything> = NULL is also NULL. You need a
> special operator to check if something is NULL, hence IS NULL and IS NOT
> NULL. SQL standard says so.
>
> This is a FAQ but I don't see it mentioned there.

Ok, but since this can be quite annoying and unexpected, could we get an
operator that does not use tristate logic but simply compares? Maybe == which
seems to be free :-)

So X==Y is true if X and Y are equal or both are null, false othervise.

Baldur

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Mark Kirkwood 2004-01-01 22:58:47 Re: why the need for is null?
Previous Message Martin Marques 2004-01-01 22:31:52 Re: GetLastInsertID ?