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

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

From: "Matt Magoffin" <postgresql(dot)org(at)msqr(dot)us>
To: "Kris Jurka" <books(at)ejurka(dot)com>
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:16:12
Message-ID: 49230.192.168.1.108.1197663372.squirrel@msqr.us (view raw or flat)
Thread:
Lists: pgsql-jdbc
>> Do you think it's worth considering having the 8.3 driver do this
>> automatic conversion of String <-> xml, so that users don't have to use
>> PGObject or set the stringtype=unspecified connection parameter?
>
> The driver can't really do that.  At the time you say setString, the
> driver doesn't know that the real target type is xml, so the driver's only
> options are to set the parameter type to varchar (String) or unknown (the
> unspecified URL parameter).
>
> Kris Jurka

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? I apologize if these are obvious questions, I'm just
bouncing ideas around.

-- m@

In response to

Responses

pgsql-jdbc by date

Next:From: Kris JurkaDate: 2007-12-14 20:31:08
Subject: Re: how to set a PreparedStatement column of XML type in 8.3?
Previous:From: dmpDate: 2007-12-14 16:42: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