pg.ddx.io pgsql-jdbc@postgresql.org mailing list archive
help / color / mirror / Atom feedJDBC driver method setClob always uses getAsciiStream()
2+ messages / 2 participants
[nested] [flat]
* JDBC driver method setClob always uses getAsciiStream()
@ 2010-09-07 15:31 Jochen Terstiege <jochen.terstiege@quinscape.de>
0 siblings, 1 reply; 2+ messages in thread
From: Jochen Terstiege @ 2010-09-07 15:31 UTC (permalink / raw)
To: 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();
...
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: JDBC driver method setClob always uses getAsciiStream()
@ 2010-09-08 09:10 Kris Jurka <books@ejurka.com>
parent: Jochen Terstiege <jochen.terstiege@quinscape.de>
0 siblings, 0 replies; 2+ messages in thread
From: Kris Jurka @ 2010-09-08 09:10 UTC (permalink / raw)
To: Jochen Terstiege <jochen.terstiege@quinscape.de>; +Cc: pgsql-jdbc
On Tue, 7 Sep 2010, Jochen Terstiege wrote:
> 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?
>
Here are my comments from the identical earlier report on the -bugs list.
http://archives.postgresql.org/pgsql-bugs/2010-09/msg00034.php
Kris Jurka
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2010-09-08 09:10 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2010-09-07 15:31 JDBC driver method setClob always uses getAsciiStream() Jochen Terstiege <jochen.terstiege@quinscape.de>
2010-09-08 09:10 ` Kris Jurka <books@ejurka.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox