Skip site navigation (1) Skip section navigation (2)

Re: how to set a PreparedStatement column of XML type in 8.3?

From: Kris Jurka <books(at)ejurka(dot)com>
To: Matt Magoffin <postgresql(dot)org(at)msqr(dot)us>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: how to set a PreparedStatement column of XML type in 8.3?
Date: 2007-12-14 20:31:08
Message-ID: Pine.BSO.4.64.0712141529390.29577@leary.csoft.net (view raw or flat)
Thread:
Lists: pgsql-jdbc

On Sat, 15 Dec 2007, Matt Magoffin wrote:

> What about with calls to setObject(int, Object, int) when a String is
> passed in and the type set to Types.OTHER? Would it be possible then...
> say if Object is a String, to treat it as if the stringtype=unspecified
> parameter was set?

Sounds like a good idea to me.  Right now it bails out with the following, 
so it's not like we'd be breaking anything that's working...

org.postgresql.util.PSQLException: Cannot cast an instance of 
java.lang.String to type Types.OTHER

Kris Jurka

In response to

pgsql-jdbc by date

Next:From: Altaf MalikDate: 2007-12-14 21:50:52
Subject: Re: JDBC causing the connection to close after executing a COPY command
Previous:From: Matt MagoffinDate: 2007-12-14 20:16:12
Subject: Re: how to set a PreparedStatement column of XML type in 8.3?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group