From: Tom Lane <tgl@sss.pgh.pa.us>
To: Dave Cramer <pg@fastcrypt.com>
Cc: Chris Stuhr <cstuhr@ephibian.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Null bind variable in where clause
Date: Tue, 01 May 2007 10:51:00 -0400
Message-ID: <17166.1178031060@sss.pgh.pa.us> (raw)
In-Reply-To: <4906DD3E-322A-4E26-8600-B967AFA8A58F@fastcrypt.com>
References: <46369940.1030801@ephibian.com>
<4906DD3E-322A-4E26-8600-B967AFA8A58F@fastcrypt.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: tgl@sss.pgh.pa.us, pg@fastcrypt.com, cstuhr@ephibian.com
Subject: Re: Null bind variable in where clause
In-Reply-To: <17166.1178031060@sss.pgh.pa.us>
References: <46369940.1030801@ephibian.com> <4906DD3E-322A-4E26-8600-B967AFA8A58F@fastcrypt.com> <17166.1178031060@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox