Re: Null bind variable in where clause

From: Andrew Lazarus <drlaz(at)attglobal(dot)net>
To: Chris Stuhr <cstuhr(at)ephibian(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Null bind variable in where clause
Date: 2007-05-29 03:15:59
Message-ID: 1167646704.20070528201559@attglobal.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Hello Chris,

Another approach is ... WHERE (b=?) IS TRUE or
... WHERE (b=?) IS NOT FALSE
depending which behavior you want when b IS NULL.

Monday, April 30, 2007, 6:34:56 PM, you wrote:

> It looks like you can not use a bind variable when trying to match null
> in a where clause. Is there any way to get the desired effect without
> having to remove the bind variable and rewrite the query to "WHERE b IS
> null"?

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Kalle Hallivuori 2007-05-30 12:29:47 FYI: porting Copy API to 8.x
Previous Message Guy Rouillier 2007-05-28 19:57:53 Re: which jdk i should opt for pgsql8.2 to implement jdbc interface