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

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

From: "Matt Magoffin" <postgresql(dot)org(at)msqr(dot)us>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: how to set a PreparedStatement column of XML type in 8.3?
Date: 2007-12-12 04:42:03
Message-ID: 51046.192.168.1.108.1197434523.squirrel@msqr.us (view raw or flat)
Thread:
Lists: pgsql-jdbc
I'm using the 8.3dev-602 JDBC driver, trying to set the value of an "xml"
type column in an 8.3 database. The driver keeps throwing exceptions like

ERROR: column "xml" is of type xml but expression is of type character
varying

I've tried a variety of different ways, including pstmt.setString,
pstmt.setObject, and pstmt.setObject passing in Types.OTHER.

What is the correct way to set a statement parameter value for an xml column?

Thanks,
m@

Responses

pgsql-jdbc by date

Next:From: Ken JohansonDate: 2007-12-12 05:53:42
Subject: RETURNING clause: how to specifiy column indexes?
Previous:From: Oliver JowettDate: 2007-12-11 22:32:00
Subject: Re: JDBC driver patch for non-ASCII users

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