pg.ddx.io pgsql-jdbc@postgresql.org mailing list archive
help / color / mirror / Atom feedResultSet.updateCharacterStream
5+ messages / 2 participants
[nested] [flat]
* ResultSet.updateCharacterStream
@ 2004-06-17 14:53 Jan de Visser <jdevisser@digitalfairway.com>
2004-06-17 19:11 ` Re: ResultSet.updateCharacterStream Kris Jurka <books@ejurka.com>
2004-06-21 03:13 ` Re: ResultSet.updateCharacterStream Kris Jurka <books@ejurka.com>
0 siblings, 2 replies; 5+ messages in thread
From: Jan de Visser @ 2004-06-17 14:53 UTC (permalink / raw)
To: pgsql-jdbc
Hello,
AbstractJdbc2ResultSet.updateCharacterStream is horribly broken.
The attached fixes it for me.
Thank you,
JdV!!
--
--------------------------------------------------------------
Jan de Visser jdevisser@digitalfairway.com
Baruk Khazad! Khazad ai-menu!
--------------------------------------------------------------
Attachments:
updateCharacterStream.diff (text/x-diff, 849B) download
Index: AbstractJdbc2ResultSet.java
===================================================================
RCS file: /usr/local/cvsroot/pgjdbc/pgjdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java,v
retrieving revision 1.38
diff -u -3 -p -r1.38 AbstractJdbc2ResultSet.java
--- AbstractJdbc2ResultSet.java 16 Jun 2004 05:10:15 -0000 1.38
+++ AbstractJdbc2ResultSet.java 17 Jun 2004 14:49:49 -0000
@@ -957,7 +957,7 @@ public abstract class AbstractJdbc2Resul
)
throws SQLException
{
- char[] theData = null;
+ char[] theData = new char[ length ];
try
{
x.read(theData, 0, length);
@@ -971,7 +971,7 @@ public abstract class AbstractJdbc2Resul
{
throw new PSQLException("postgresql.updateable.ioerror", null, ie);
}
- updateValue(columnIndex, theData);
+ updateValue(columnIndex, new String( theData ) );
}
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: ResultSet.updateCharacterStream
2004-06-17 14:53 ResultSet.updateCharacterStream Jan de Visser <jdevisser@digitalfairway.com>
@ 2004-06-17 19:11 ` Kris Jurka <books@ejurka.com>
2004-06-17 19:33 ` Re: ResultSet.updateCharacterStream Jan de Visser <jdevisser@digitalfairway.com>
1 sibling, 1 reply; 5+ messages in thread
From: Kris Jurka @ 2004-06-17 19:11 UTC (permalink / raw)
To: Jan de Visser <jdevisser@digitalfairway.com>; +Cc: pgsql-jdbc
On Thu, 17 Jun 2004, Jan de Visser wrote:
> Hello,
>
> AbstractJdbc2ResultSet.updateCharacterStream is horribly broken.
Yes, yes it is. It also appears to need the fixes made to
Statement.setCharacterStream that do not make the assumption that read
will return length, but may need to be called multiple times. Will fix.
Kris Jurka
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: ResultSet.updateCharacterStream
2004-06-17 14:53 ResultSet.updateCharacterStream Jan de Visser <jdevisser@digitalfairway.com>
2004-06-17 19:11 ` Re: ResultSet.updateCharacterStream Kris Jurka <books@ejurka.com>
@ 2004-06-17 19:33 ` Jan de Visser <jdevisser@digitalfairway.com>
0 siblings, 0 replies; 5+ messages in thread
From: Jan de Visser @ 2004-06-17 19:33 UTC (permalink / raw)
To: pgsql-jdbc
On June 17, 2004 03:11 pm, Kris Jurka wrote:
> It also appears to need the fixes made to
> Statement.setCharacterStream that do not make the assumption that read
> will return length, but may need to be called multiple times.
Yeah, I was too lazy to fix that to. In our case the Reader is always a
StringReader (need stupid hoop-jumping because Oracle is too stupid), so
that's not an issue...
JdV!!
--
--------------------------------------------------------------
Jan de Visser jdevisser@digitalfairway.com
Baruk Khazad! Khazad ai-menu!
--------------------------------------------------------------
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: ResultSet.updateCharacterStream
2004-06-17 14:53 ResultSet.updateCharacterStream Jan de Visser <jdevisser@digitalfairway.com>
@ 2004-06-21 03:13 ` Kris Jurka <books@ejurka.com>
2004-06-21 03:35 ` Re: ResultSet.updateCharacterStream Jan de Visser <jdevisser@digitalfairway.com>
1 sibling, 1 reply; 5+ messages in thread
From: Kris Jurka @ 2004-06-21 03:13 UTC (permalink / raw)
To: Jan de Visser <jdevisser@digitalfairway.com>; +Cc: pgsql-jdbc
On Thu, 17 Jun 2004, Jan de Visser wrote:
> AbstractJdbc2ResultSet.updateCharacterStream is horribly broken.
>
Fixed in both 7.4 and 7.5 trees.
Kris Jurka
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: ResultSet.updateCharacterStream
2004-06-17 14:53 ResultSet.updateCharacterStream Jan de Visser <jdevisser@digitalfairway.com>
2004-06-21 03:13 ` Re: ResultSet.updateCharacterStream Kris Jurka <books@ejurka.com>
@ 2004-06-21 03:35 ` Jan de Visser <jdevisser@digitalfairway.com>
0 siblings, 0 replies; 5+ messages in thread
From: Jan de Visser @ 2004-06-21 03:35 UTC (permalink / raw)
To: pgsql-jdbc
On June 20, 2004 11:13 pm, Kris Jurka wrote:
> On Thu, 17 Jun 2004, Jan de Visser wrote:
> > AbstractJdbc2ResultSet.updateCharacterStream is horribly broken.
>
> Fixed in both 7.4 and 7.5 trees.
Awesome...
>
> Kris Jurka
JdV!!
--
--------------------------------------------------------------
Jan de Visser jdevisser@digitalfairway.com
Baruk Khazad! Khazad ai-menu!
--------------------------------------------------------------
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2004-06-21 03:35 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-06-17 14:53 ResultSet.updateCharacterStream Jan de Visser <jdevisser@digitalfairway.com>
2004-06-17 19:11 ` Kris Jurka <books@ejurka.com>
2004-06-17 19:33 ` Jan de Visser <jdevisser@digitalfairway.com>
2004-06-21 03:13 ` Kris Jurka <books@ejurka.com>
2004-06-21 03:35 ` Jan de Visser <jdevisser@digitalfairway.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