X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 2BB7C53474 for ; Thu, 24 Mar 2005 19:59:13 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 48945-06 for ; Thu, 24 Mar 2005 19:59:11 +0000 (GMT) Received: from mail63.csoft.net (leary3.csoft.net [63.111.22.74]) by svr1.postgresql.org (Postfix) with SMTP id 9C55A533F6 for ; Thu, 24 Mar 2005 19:58:22 +0000 (GMT) Received: (qmail 32669 invoked by uid 1112); 24 Mar 2005 19:58:11 -0000 Date: Thu, 24 Mar 2005 14:58:11 -0500 (EST) From: Kris Jurka X-X-Sender: books@leary.csoft.net To: Michael Barker Cc: acoliver@jboss.org, pgsql-jdbc@postgresql.org Subject: Re: [Patch] JDBC3 Blob support In-Reply-To: <52841.192.85.50.1.1111594305.squirrel@corona.dnsalias.net> Message-ID: References: <1108864694.5883.5.camel@corona> <1109997557.3838.1.camel@corona> <52841.192.85.50.1.1111594305.squirrel@corona.dnsalias.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.013 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200503/190 X-Sequence-Number: 12582 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. 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