pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: John Scott <jmscott@yahoo.com>
To: pgsql-sql@postgresql.org
Subject: not null - trivial, unexpected behavior
Date: Sat, 16 Jun 2001 08:16:11 -0700 (PDT)
Message-ID: <20010616151611.40654.qmail@web10006.mail.yahoo.com> (raw)

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/



view thread (10+ messages)  latest in thread

Message-ID: <20010616151611.40654.qmail@web10006.mail.yahoo.com>
Permalink:  ../20010616151611.40654.qmail@web10006.mail.yahoo.com/
Also on:    postgresql.org/message-id/20010616151611.40654.qmail@web10006.mail.yahoo.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: jmscott@yahoo.com
  Subject: Re: not null - trivial, unexpected behavior
  In-Reply-To: <20010616151611.40654.qmail@web10006.mail.yahoo.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox