John Scott writes:
> insert into A(a) values('a1');
> insert into A(a, b) values('a2', 'b2');
>
> select count(*) from A where b = null;      /* Returns 1, ok */
no
> select count(*) from A where b != null;     /* Returns 0 ... not ok! */
yes
> What am i missing?  Shouldn't those two sets be complimentary?
They should.  There's a thread about the abnormal behaviour of foo = NULL
in the -hackers archive of last/this(?) week.  You should use 'foo is
[not] null' anyway.
See also
http://www.ca.postgresql.org/users-lounge/docs/7.1/postgres/functions-comparison.html
-- 
Peter Eisentraut   peter_e(at)gmx(dot)net   http://funkturm.homeip.net/~peter