JDBC driver method setClob always uses getAsciiStream()

Поиск
Список
Период
Сортировка
От Jochen Terstiege
Тема JDBC driver method setClob always uses getAsciiStream()
Дата
Msg-id 4C865AE5.5000906@quinscape.de
обсуждение исходный текст
Ответы Re: JDBC driver method setClob always uses getAsciiStream()
Список pgsql-jdbc
Using driver: postgresql-8.4-701.jdbc3.jar

The method setClob() in the AbstractJdbc2Statement calls the method
getAsciiStream() on the provided Clob. This leads to problems if the
given Clob contains an UTF-8 encoded string.

Shouldn't the driver call getCharacterStream() instead? Can this problem
be solved in a different way?

Relevant code from the class:

     public void setClob(int i, Clob x) throws SQLException
     {
         checkClosed();

         if (x == null)
         {
             setNull(i, Types.CLOB);
             return;
         }

         InputStream l_inStream = x.getAsciiStream();
         ...

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

Предыдущее
От: Florian Weimer
Дата:
Сообщение: Re: uuid values as parameters
Следующее
От: joiny
Дата:
Сообщение: postgresql 8.4 type mapping problem