pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jan de Visser <jdevisser@digitalfairway.com>
To: pgsql-jdbc@postgresql.org
Subject: ResultSet.updateCharacterStream
Date: Thu, 17 Jun 2004 10:53:02 -0400
Message-ID: <200406171053.02305.jdevisser@digitalfairway.com> (raw)

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 ) ); }

view thread (5+ messages)  latest in thread

Message-ID: <200406171053.02305.jdevisser@digitalfairway.com>
Permalink:  ../200406171053.02305.jdevisser@digitalfairway.com/
Also on:    postgresql.org/message-id/200406171053.02305.jdevisser@digitalfairway.com

 ·  · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: jdevisser@digitalfairway.com
  Subject: Re: ResultSet.updateCharacterStream
  In-Reply-To: <200406171053.02305.jdevisser@digitalfairway.com>
  References: <200406171053.02305.jdevisser@digitalfairway.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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