Re: Null bind variable in where clause - Mailing list pgsql-jdbc

From Tom Lane
Subject Re: Null bind variable in where clause
Date
Msg-id 17166.1178031060@sss.pgh.pa.us
Whole thread Raw
In response to Re: Null bind variable in where clause  (Dave Cramer <pg@fastcrypt.com>)
List pgsql-jdbc
Dave Cramer <pg@fastcrypt.com> 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

pgsql-jdbc by date:

Previous
From: Mark Lewis
Date:
Subject: Re: Null bind variable in where clause
Next
From: Altaf Malik
Date:
Subject: JDBC Default Encoding