Re: [Patch] JDBC3 Blob support - Mailing list pgsql-jdbc

From Michael Barker
Subject Re: [Patch] JDBC3 Blob support
Date
Msg-id 1111736540.3674.4.camel@corona
Whole thread Raw
In response to Re: [Patch] JDBC3 Blob support  (Kris Jurka <books@ejurka.com>)
Responses Re: [Patch] JDBC3 Blob support
List pgsql-jdbc
On Thu, 2005-03-24 at 14:58 -0500, Kris Jurka wrote:
>
> On Wed, 23 Mar 2005, Michael Barker wrote:
>
> > I will have a look at the patch over the weekend.  When I wrote the CLOB
> > stuff I set it up to always use a single byte encoding, except when using
> > get/setCharacterStream.  If a user required mulltibyte encodings then they
> > should use the Reader/Writer combination exclusively.
>
> AbstractJdbc2Clob.getSubString creates a String from bytes with no
> encoding specified.
>
> AbstractJdbc3Clob.setString(long, String, int, int) gets a String's bytes
> with no encoding specified.

Yeah, you got me.  My intent was to implement the above, but I kinda
hacked in the CLOB stuff, as I was more interested in getting the BLOB
support in place.  If you would be willing to commit the BLOB pieces
then it would be appreciated as this has the greatest benefit to the
JBoss Mail project.  I am still interested in doing the CLOB stuff as a
have a picture of how to do it (though its not pretty), but would prefer
it not to hold up the BLOB support.  Would you like me to resubmit a
BLOB patch w/JUnits?

>
> Even when the user wants a multibyte encoding they are stuck using the
> JVM's default encoding because the Reader/Writer's are not created with an
> encoding specified.
>
> Yeah, it's a complicated issue.  I know you were after just the BLOB part
> and I pushed you into the CLOB part.  No one else has any feedback, and no
> matter what we do it won't be all that good, so maybe the smart thing to
> do is just to abandon the CLOB part and just put the BLOB in by itself.
> Not to discourage you if you really are interested in the CLOB part of it,
> just letting you know that it's not a prerequisite for the BLOB part to
> get in.
>
> Kris Jurka
>

Mike.


pgsql-jdbc by date:

Previous
From: David Gagnon
Date:
Subject: plpgsql function with RETURNS SETOF refcursor AS. How to get it work via JDBC
Next
From: Kris Jurka
Date:
Subject: Re: Unable to make a connention through jdbc