Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 8EBBB9FB1D4 for ; Tue, 1 May 2007 11:52:38 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 81035-02 for ; Tue, 1 May 2007 11:52:35 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 3B7469FA462 for ; Tue, 1 May 2007 11:52:35 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id l41Ep1ds017167; Tue, 1 May 2007 10:51:01 -0400 (EDT) To: Dave Cramer cc: Chris Stuhr , pgsql-jdbc@postgresql.org Subject: Re: Null bind variable in where clause In-reply-to: <4906DD3E-322A-4E26-8600-B967AFA8A58F@fastcrypt.com> References: <46369940.1030801@ephibian.com> <4906DD3E-322A-4E26-8600-B967AFA8A58F@fastcrypt.com> Comments: In-reply-to Dave Cramer message dated "Tue, 01 May 2007 07:21:39 -0400" Date: Tue, 01 May 2007 10:51:00 -0400 Message-ID: <17166.1178031060@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200705/4 X-Sequence-Number: 16994 Dave Cramer writes: > If you really want this behaviour then > set > transform_null_equals = off to on > in postgresql.conf Don't think that will help him --- that kluge just causes "foo = NULL" to be translated to "foo IS NULL" *when the NULL is written as a literal constant*. He seems to want a null passed through a parameter symbol to be treated as a normal comparable value. The short answer is that you can't do that in SQL; better rethink your usage of NULL, because it hasn't got the behavior you want. regards, tom lane