why the need for is null? - Mailing list pgsql-general

From Baldur Norddahl
Subject why the need for is null?
Date
Msg-id 1072993535.3ff494ff59605@localhost
Whole thread Raw
Responses Re: why the need for is null?
Re: why the need for is null?
List pgsql-general
Hi,

How come "X=null" is not the same as "X is null"? I got a few selects with
queries like this:

select * from foo where customer=#customer# or (#customer# is null and customer
is null)

Without the last part, it will not correctly match null customers.

PS. I am using the ibatis framework for java, so the #customer# gets translated
to ? and the whole thing made into a prepared statement.

Thanks,

Baldur

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

pgsql-general by date:

Previous
From: Mike Nolan
Date:
Subject: Re: GetLastInsertID ?
Next
From: Stephane Pinel
Date:
Subject: Re: GetLastInsertID ?