pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mikko Tiihonen <mikko.tiihonen@nitorcreations.com>
To: bht@actrix.gen.nz
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Bug: Cannot pass null in Parameter in Query for ISNULL
Date: Thu, 01 Dec 2011 11:21:26 +0200
Message-ID: <4ED74716.7070904@nitorcreations.com> (raw)
In-Reply-To: <otbed755q4hd5fnevkpnetcf6csep0b97u@4ax.com>
References: <6ekbd7dm4d6su5b9i4hsf92ibv4j76n51f@4ax.com>
	<CA+0W9LN_HnO8AKPBTLAGWo9xfYnFXGT7BcCNBp7xBsx1y_y5-w@mail.gmail.com>
	<CA+0W9LM4xcS0r=X_TwUA4kJKpat+1WitY01eB8WD6Rgzj=i0mg@mail.gmail.com>
	<htlbd79p6n9uf8guddj3sg995i786ode99@4ax.com>
	<CA+0W9LPMOW6pD7sMuvupDaFNvFowrE2trNuark2PTbCmyRVDvQ@mail.gmail.com>
	<otbed755q4hd5fnevkpnetcf6csep0b97u@4ax.com>

On 12/01/2011 09:58 AM, bht@actrix.gen.nz wrote:
> Hi Oliver,
>
> Thanks for your reply. Onfortunately I cannot see a solution in your
> elaboration. However I am still confident that there will be one at
> some point in the future.
>
>  From an application perspective it is of course nonsense to code
> variations of the same SQL statement depending on parameters having
> specific values as required by the workaround. In case of JPA this
> option does not even exist.
>
> A Java application programmer has to go through extreme hassle in such
> a simple case. That hassle is not worth it.

So far it has been established that the JPA implementation you are
using uses an unportable hack that happens to work for some DB vendors
but not with postgresql.

Can you comment on why our proposal to remove the hack from the JPA
implementation and replace it with the JDBC recommended way of sending
NULL is not the correct way forward?

This would enable the JPA driver to work with any DB vendor providing
a standard compliant JDBC driver such as postgres, mysql, oracle etc.

As the promise of a JPA layer is to abstract the DB specifics away,
when you report the issue to your JPA vendor it should be of high
priority to them to fix their code. In this particular case the
JPA implementation has the correct type information readily at hand
but the forgets to pass it to the JDBC driver as recommeneded in
JDBC specification.

PS. Have you tried if a newer version of the JPA implementation you are
using has already fixed the problem?

-Mikko



view thread (13+ messages)  latest in thread

Message-ID: <4ED74716.7070904@nitorcreations.com>
Permalink:  ../4ED74716.7070904@nitorcreations.com/
Also on:    postgresql.org/message-id/4ED74716.7070904@nitorcreations.com

 · 

reply

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: mikko.tiihonen@nitorcreations.com, bht@actrix.gen.nz
  Subject: Re: Bug: Cannot pass null in Parameter in Query for ISNULL
  In-Reply-To: <4ED74716.7070904@nitorcreations.com>
  References: <6ekbd7dm4d6su5b9i4hsf92ibv4j76n51f@4ax.com> <CA+0W9LN_HnO8AKPBTLAGWo9xfYnFXGT7BcCNBp7xBsx1y_y5-w@mail.gmail.com> <CA+0W9LM4xcS0r=X_TwUA4kJKpat+1WitY01eB8WD6Rgzj=i0mg@mail.gmail.com> <htlbd79p6n9uf8guddj3sg995i786ode99@4ax.com> <CA+0W9LPMOW6pD7sMuvupDaFNvFowrE2trNuark2PTbCmyRVDvQ@mail.gmail.com> <otbed755q4hd5fnevkpnetcf6csep0b97u@4ax.com> <4ED74716.7070904@nitorcreations.com>

* 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