problem selecting rows with null value - Mailing list pgsql-general

From Matthew Phillips
Subject problem selecting rows with null value
Date
Msg-id 3E6FD522.8090803@timing.com
Whole thread Raw
Responses Re: problem selecting rows with null value  (Joshua Moore-Oliva <josh@chatgris.com>)
Re: problem selecting rows with null value  (Joshua Moore-Oliva <josh@chatgris.com>)
Re: problem selecting rows with null value  (Jord Tanner <jord@indygecko.com>)
List pgsql-general
I am sure that I am doing something subtly wrong with my sql syntax
here. I thought that it was a timestamp null column issue, but it
doesn't work with int either. Is there a special way to denote the null
value in a situation like this that I don't know about?

tsc=# create table pleah(
tsc(# foo INT NOT NULL,
tsc(# bar timestamp DEFAULT NULL );
CREATE TABLE
tsc=# insert into pleah (foo) values (1);
INSERT 206475246 1

###ok here I would just like to select that row that I just inserted...
but no!

tsc=# select * from pleah where bar = NULL;
 foo | bar
-----+-----
(0 rows)

tsc=# select * from pleah;
 foo | bar
-----+-----
   1 |
(1 row)

thanks muchly
matthew


pgsql-general by date:

Previous
From: Joshua Moore-Oliva
Date:
Subject: Re: Making a function call from within a transaction block. -- ignore
Next
From: Joshua Moore-Oliva
Date:
Subject: Re: problem selecting rows with null value