not null - trivial, unexpected behavior

Поиск
Список
Период
Сортировка
От John Scott
Тема not null - trivial, unexpected behavior
Дата
Msg-id 20010616151611.40654.qmail@web10006.mail.yahoo.com
обсуждение исходный текст
Ответы Re: not null - trivial, unexpected behavior  (Peter Eisentraut <peter_e@gmx.net>)
Re: not null - trivial, unexpected behavior  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: "Postgresql"
Дата:
Сообщение: calling user defined function with parameters..
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: not null - trivial, unexpected behavior