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

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

From: Gaetano Mendola <mendola(at)bigfoot(dot)com>
To: BogDan Vatra <bog_dan_ro(at)yahoo(dot)com>
Subject: Re: BUG #1921: NULL<>NULL ?!?!?!?!?!?!?
Date: 2005-09-29 13:49:36
Message-ID: 433BF0F0.1060304@bigfoot.com (view raw or flat)
Thread:
Lists: pgsql-bugs
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) !!!

This is not a bug. If you want find all values with that
field null you have to do:

select tt from test where tt is null;

And I can assure you this is what the standard say.


Regards
Gaetano Mendola


In response to

pgsql-bugs by date

Next:From: j6mDate: 2005-09-29 15:02:39
Subject: Re: BUG #1921: NULL<>NULL ?!?!?!?!?!?!?
Previous:From: Magnus HaganderDate: 2005-09-29 13:25:33
Subject: Re: BUG #1920: Installer no WIN1252 & UTF8 selection

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