not null - trivial, unexpected behavior - Mailing list pgsql-sql

From John Scott
Subject not null - trivial, unexpected behavior
Date
Msg-id 20010616151611.40654.qmail@web10006.mail.yahoo.com
Whole thread Raw
Responses Re: not null - trivial, unexpected behavior
Re: not null - trivial, unexpected behavior
List pgsql-sql
the following behaviour seems inconsistent to me.
I can qualify on nulls, but not on nonullness.

This was tested under 7.1.2

create table A
(   a    text,   b    text
);

insert into A(a) values('a1');
insert into A(a, b) values('a2', 'b2');

select count(*) from A where b = null;      /* Returns 1, ok */
select count(*) from A where b != null;     /* Returns 0 ... not ok! */

What am i missing?  Shouldn't those two sets be complimentary?

john


=====
John Scott
Senior Partner
August Associates

email: john@august.com web: http://www.august.com/~jmscott

__________________________________________________
Do You Yahoo!?
Spot the hottest trends in music, movies, and more.
http://buzz.yahoo.com/


pgsql-sql by date:

Previous
From: "Postgresql"
Date:
Subject: calling user defined function with parameters..
Next
From: Peter Eisentraut
Date:
Subject: Re: not null - trivial, unexpected behavior