Re: JDBC problem with dates and ANYELEMENT type

From: Kris Jurka <books(at)ejurka(dot)com>
To: Peter <peter(at)greatnowhere(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: JDBC problem with dates and ANYELEMENT type
Date: 2009-04-24 02:35:49
Message-ID: Pine.BSO.4.64.0904232234430.16180@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Jeppe Sommer 2009-04-24 08:17:42 Here's a fix to AbstractJdbc3Statement.getGeneratedKeys
Previous Message Peter 2009-04-23 08:13:28 JDBC problem with dates and ANYELEMENT type