BUG #5637: JDBC driver method setClob always uses getAsciiStream()

Поиск
Список
Период
Сортировка
От Jochen Terstiege
Тема BUG #5637: JDBC driver method setClob always uses getAsciiStream()
Дата
Msg-id 201009021217.o82CHHT8041119@wwwmaster.postgresql.org
обсуждение исходный текст
Ответы Re: BUG #5637: JDBC driver method setClob always uses getAsciiStream()  (Kris Jurka <books@ejurka.com>)
Список pgsql-bugs
The following bug has been logged online:

Bug reference:      5637
Logged by:          Jochen Terstiege
Email address:      jochen.terstiege@quinscape.de
PostgreSQL version: 8.4
Operating system:   Windows XP SP3
Description:        JDBC driver method setClob always uses getAsciiStream()
Details:

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.

Should 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-bugs по дате отправления:

Предыдущее
От: "KOIZUMI Satoru"
Дата:
Сообщение: BUG #5636: extra "(" or missing ")"
Следующее
От: "KOIZUMI Satoru"
Дата:
Сообщение: BUG #5638: disagreement of argument name