Skip site navigation (1) Skip section navigation (2)

Re: BUG #1921: NULL<>NULL ?!?!?!?!?!?!?

From: David Fetter <david(at)fetter(dot)org>
To: BogDan Vatra <bog_dan_ro(at)yahoo(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #1921: NULL<>NULL ?!?!?!?!?!?!?
Date: 2005-09-29 17:41:56
Message-ID: 20050929174156.GD7534@fetter.org (view raw or flat)
Thread:
Lists: pgsql-bugs
On Thu, Sep 29, 2005 at 09:38:54AM +0100, BogDan Vatra wrote:
> 
> The following bug has been logged online:
> 
> Bug reference:      1921
> Logged by:          BogDan Vatra
> Email address:      bog_dan_ro(at)yahoo(dot)com
> PostgreSQL version: 8.0.3
> Operating system:   win xp pro
> Description:        NULL<>NULL ?!?!?!?!?!?!?
> Details: 
> 
> Please execute this query:
> 
> create table test (id serial, tt varchar(50));
> insert into test (tt) values(NULL);
> select tt from test where tt=NULL;
> 
> This should return 1 row but ...
> An then try 
> 
> select tt from test where tt<>NULL;
> 
> 0 row(s) !!!

It is not a bug.  NULL isn't a datum.  It's a state of ignorance.  If
I don't know what your birthday is and I don't know what your
coworker's birthday is, I also don't know whether they are equal, and
so the only right answer to "Is BogDan's birthday unequal to his
coworker's?" is "I don't know."

HTH :)

Cheers,
D
-- 
David Fetter david(at)fetter(dot)org http://fetter.org/
phone: +1 510 893 6100   mobile: +1 415 235 3778

Remember to vote!

In response to

pgsql-bugs by date

Next:From: Martin PittDate: 2005-09-29 21:08:22
Subject: horology regression test failure
Previous:From: Magnus HaganderDate: 2005-09-29 17:35:45
Subject: Re: BUG #1920: Installer no WIN1252 & UTF8 selection

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group