Skip site navigation (1) Skip section navigation (2)

Re: Null bind variable in where clause

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Dave Cramer <pg(at)fastcrypt(dot)com>
Cc: Chris Stuhr <cstuhr(at)ephibian(dot)com>, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Null bind variable in where clause
Date: 2007-05-01 14:51:00
Message-ID: 17166.1178031060@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-jdbc
Dave Cramer <pg(at)fastcrypt(dot)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

In response to

pgsql-jdbc by date

Next:From: Altaf MalikDate: 2007-05-01 15:29:16
Subject: JDBC Default Encoding
Previous:From: Mark LewisDate: 2007-05-01 14:10:16
Subject: Re: Null bind variable in where clause

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group