Re: JDBC problem with dates and ANYELEMENT type - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: JDBC problem with dates and ANYELEMENT type
Date
Msg-id Pine.BSO.4.64.0904232234430.16180@leary.csoft.net
Whole thread Raw
In response to JDBC problem with dates and ANYELEMENT type  ("Peter" <peter@greatnowhere.com>)
Responses Re: JDBC problem with dates and ANYELEMENT type  ("Peter" <peter@greatnowhere.com>)
List pgsql-jdbc

On Thu, 23 Apr 2009, Peter wrote:

> So it indeed sets ‘unspecified’ type which works fine if your target
> datatype is defined, but fails miserably on ANYELEMENT.
>
> Any suggestions how to work around this so we can still use ANYELEMENT
> and pass in DATE?
>

You can put a cast into the query itself "SELECT ?::date".

Kris Jurka

pgsql-jdbc by date:

Previous
From: "Peter"
Date:
Subject: JDBC problem with dates and ANYELEMENT type
Next
From: Jeppe Sommer
Date:
Subject: Here's a fix to AbstractJdbc3Statement.getGeneratedKeys