very big problem with NULL

From: Grant <grant(at)xactcommerce(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: very big problem with NULL
Date: 2001-06-07 23:11:21
Message-ID: 3B200A18.A6537536@xactcommerce.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Martijn van Oosterhout 2001-06-08 00:35:23 Re: [GENERAL] REPOST: redefining location of the socket file /tmp/.s.PGSQL.5432
Previous Message Phuong Ma 2001-06-07 23:07:04 WAL article