pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Craig Ringer <ringerc@ringerc.id.au>
To: Oliver Jowett <oliver@opencloud.com>
Cc: Mikko Tiihonen <mikko.tiihonen@nitorcreations.com>
Cc: 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 21:39:45 +0800
Message-ID: <4ED783A1.4040609@ringerc.id.au> (raw)
In-Reply-To: <CA+0W9LNtwsx=gWJha3wX+hxXgc1tA3OH=Cr5PerwER23Noabkg@mail.gmail.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>
	<CA+0W9LNtwsx=gWJha3wX+hxXgc1tA3OH=Cr5PerwER23Noabkg@mail.gmail.com>

On 12/01/2011 05:38 PM, Oliver Jowett wrote:
> On 1 December 2011 22:21, Mikko Tiihonen
> <mikko.tiihonen@nitorcreations.com>  wrote:
>
>> 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.
>
> While we're at it - what is the JPA implementation in question?

I'd be interested too, as I've had no issues related to null handling 
using EclipseLink or Hibernate (3 and 4) with PostgreSQL.



(on a side-note):

I *have* had annoying issues working with the `xml' datatype (and other 
text-like types) where I'd like to work with them as String in Java. 
This is really a JPA deficiency as much as a PgJDBC one, in that JPA 
doesn't really offer a way to say "this is the Java type, but please use 
this other SQLTYPE when passing it to the JDBC driver". The JPA 
implementation would use setString(...) instead of setObject(...) with 
the SQLXML type constant, and Pg would refuse to accept a `text' value 
for an `xml' field.

I kind of wish there was an implicit cast from `text' to `xml' since 
there's well-formedness checking done anyway, but in this case the real 
problem is that JPA doesn't let you specify an explicit JPA type or 
override how the value is passed to the JDBC driver. Some specific JPA 
implementations offer extensions for this, though.

--
Craig Ringer



view thread (13+ messages)  latest in thread

Message-ID: <4ED783A1.4040609@ringerc.id.au>
Permalink:  ../4ED783A1.4040609@ringerc.id.au/
Also on:    postgresql.org/message-id/4ED783A1.4040609@ringerc.id.au

 · 

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: ringerc@ringerc.id.au, oliver@opencloud.com, mikko.tiihonen@nitorcreations.com, bht@actrix.gen.nz
  Subject: Re: Bug: Cannot pass null in Parameter in Query for ISNULL
  In-Reply-To: <4ED783A1.4040609@ringerc.id.au>
  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> <CA+0W9LNtwsx=gWJha3wX+hxXgc1tA3OH=Cr5PerwER23Noabkg@mail.gmail.com> <4ED783A1.4040609@ringerc.id.au>

* 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