Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id AA5029FB6A1 for ; Tue, 29 May 2007 00:22:56 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 72390-04 for ; Tue, 29 May 2007 00:22:40 -0300 (ADT) X-Greylist: delayed 00:06:38.677629 by SQLgrey-1.7.5 Received: from smtp102.sbc.mail.mud.yahoo.com (smtp102.sbc.mail.mud.yahoo.com [68.142.198.201]) by postgresql.org (Postfix) with SMTP id 710309FB704 for ; Tue, 29 May 2007 00:22:45 -0300 (ADT) Received: (qmail 95090 invoked from network); 29 May 2007 03:16:05 -0000 Received: from unknown (HELO ANDYXP) (drlaz@sbcglobal.net@71.135.71.231 with plain) by smtp102.sbc.mail.mud.yahoo.com with SMTP; 29 May 2007 03:16:05 -0000 X-YMail-OSG: Lj7RPIcVM1m5BMjHJQHL__nsdlfVGrnMauWPygHSxro.yHYKQlJ3d.2vTRBTIPdob4tXPQ4pwA-- Date: Mon, 28 May 2007 20:15:59 -0700 From: Andrew Lazarus X-Mailer: The Bat! (v3.99.3) Home Reply-To: Andrew Lazarus X-Priority: 3 (Normal) Message-ID: <1167646704.20070528201559@attglobal.net> To: Chris Stuhr CC: pgsql-jdbc@postgresql.org Subject: Re: Null bind variable in where clause In-Reply-To: <46369940.1030801@ephibian.com> References: <46369940.1030801@ephibian.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=BAYES_50=0.001 X-Spam-Level: X-Archive-Number: 200705/64 X-Sequence-Number: 17054 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"?