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

Поиск
Список
Период
Сортировка
От Matt Magoffin
Тема Re: how to set a PreparedStatement column of XML type in 8.3?
Дата
Msg-id 50753.192.168.1.108.1197501684.squirrel@msqr.us
обсуждение исходный текст
Ответ на how to set a PreparedStatement column of XML type in 8.3?  ("Matt Magoffin" <postgresql.org@msqr.us>)
Ответы Re: how to set a PreparedStatement column of XML type in 8.3?  (Kris Jurka <books@ejurka.com>)
Список 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@

I am able to work around the issue by setting a PGObject value with the
type set to "xml" and the value my XML String. Is this the way the driver
is expected to work, or should it map Strings to the xml type
automatically in 8.3?

-- m@


В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Oliver Jowett
Дата:
Сообщение: Re: JDBC driver patch for non-ASCII users
Следующее
От: Kris Jurka
Дата:
Сообщение: Re: how to set a PreparedStatement column of XML type in 8.3?