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 0D72C529C6 for ; Tue, 16 Aug 2005 06:44:19 -0300 (ADT) 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 23227-08 for ; Tue, 16 Aug 2005 09:44:15 +0000 (GMT) Received: from smtp-out.completel.net (smtp-out.completel.net [83.145.110.36]) by svr1.postgresql.org (Postfix) with ESMTP id 69F85529B3 for ; Tue, 16 Aug 2005 06:44:14 -0300 (ADT) Received: from mail.emicnetworks.com (unknown [213.244.29.170]) by smtp-out.completel.net (Postfix) with SMTP id 8228628005A for ; Tue, 16 Aug 2005 11:44:16 +0200 (CEST) Received: (nullmailer pid 4152 invoked by uid 1000); Tue, 16 Aug 2005 09:46:39 -0000 Date: Tue, 16 Aug 2005 11:46:39 +0200 From: Marc Herbert To: pgsql-jdbc@postgresql.org Subject: JSR, under-specified Blob.setBytes(...) ? Message-ID: <20050816094639.GC30571@emicnetworks.com> References: <224f323405080913385a38ece0@mail.gmail.com> <224f323405080914194be16ac3@mail.gmail.com> <224f3234050809153725fb91c@mail.gmail.com> <224f323405080916162cd2f75a@mail.gmail.com> <42F93CE3.1010003@opencloud.com> <20E72071-5575-4AF2-839F-65FB089968B7@fastcrypt.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20E72071-5575-4AF2-839F-65FB089968B7@fastcrypt.com> User-Agent: Mutt/1.5.6+20040907i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.041 required=5 tests=[AWL=-0.009, FORGED_RCVD_HELO=0.05] X-Spam-Level: X-Archive-Number: 200508/103 X-Sequence-Number: 13672 On Wed, Aug 10, 2005 at 08:46:25AM -0400, Dave Cramer wrote: > > > >Perhaps we can make some use of Dave's Sun contacts from his CTS work? > >Even if not it wouldn't be a bad idea to get all of the questions > >we've > >got for Sun into one place. What else do we have other than the > >getColumnDisplaySize() < 0 issue? > > > I'd be more than happy to, can we get all the questions in one place > so that we can ask them all at once. "Blob.setBytes(...)" methods are under-specified IMHO. But maybe it was on purpose, to let the door open for each DBMS to have its own and different interpretation adapted to its specific constraints. The return value (number of bytes successfully written) seems to be an indication of that; it looks like: "in corner cases, weird things can happen, so you'd better check everything you wanted was written". - When we don't write until the end of the Blob, do we keep the tail as is? Yes looks like the most sensible answer, but a comment about this would not harm. - On the other hand, what happens if the pre-existing Blob is too small, is it extended? - if it's extended, how are initialized bytes < pos ?