Search Postgresql Archives

NULL != text ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I was trying this:

IF (OLD.value != NEW.value) THEN
-- 
END IF;

and couldn't get the condition to evaluate to true at
all if OLD.value was NULL. I also tried:

IF (OLD.value NOT LIKE NEW.value) THEN
-- 
END IF;

with the same result. But this works:

IF ((OLD.value is NULL and NEW.value is NOT NULL) or
(OLD.value != NEW.value)) THEN
-- 
END IF;

So, does NULL != 'abc' always evaluate to false? The
manual
(http://www.postgresql.org/docs/8.0/interactive/functions-comparison.html)
states don't compare NULL values using =, but nothing
about using !=

CSN


		
__________________________________ 
Yahoo! Music Unlimited 
Access over 1 million songs. Try it free.
http://music.yahoo.com/unlimited/

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your
       message can get through to the mailing list cleanly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux