very big problem with NULL - Mailing list pgsql-general

From Grant
Subject very big problem with NULL
Date
Msg-id 3B200A18.A6537536@xactcommerce.com
Whole thread Raw
List pgsql-general
ok.  i've found a weird bug.  I have five records in a table.  in one
column i'm doing a select based on, two values for the column are NULL.
i do a 'SELECT testcolumn FROM testtable WHERE testcolumn!=1'.  This
query for some reason also excludes NULL, which does not make any sense
considering NULL is not equal to 1, so the records with NULL in this
column should be showing up as well.

I'm running the debian package for Postgres 7.1.2 on the Debian 'sid'
distribution.

example:

| testcolumn |
    1
    null
    0
    0
    null


SELECT testcolumn FROM testtable WHERE testcolumn != 1

results:

| testcolumn |
    0
    0




pgsql-general by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: total newbie question
Next
From: Hilkiah Lavinier
Date:
Subject: report writer/generator