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 5181FD1B190 for ; Tue, 6 Jul 2004 20:40:32 -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 39638-09 for ; Tue, 6 Jul 2004 23:40:32 +0000 (GMT) Received: from yass.opencloud.co.nz (yass.opencloud.co.nz [203.79.85.162]) by svr1.postgresql.org (Postfix) with ESMTP id 8ECC2D1B19F for ; Tue, 6 Jul 2004 20:40:28 -0300 (ADT) Received: from 203-79-104-60.cable.paradise.net.nz ([203.79.104.60] helo=opencloud.com) by yass.opencloud.co.nz with asmtp (Exim 3.35 #1 (Debian)) id 1BhzY0-0003Z3-00; Wed, 07 Jul 2004 11:40:24 +1200 Message-ID: <40EB385F.9030704@opencloud.com> Date: Wed, 07 Jul 2004 11:40:15 +1200 From: Oliver Jowett User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6b) Gecko/20031205 Thunderbird/0.4 X-Accept-Language: en-us, en MIME-Version: 1.0 To: pg@fastcrypt.com Cc: Kris Jurka , "pgsql-jdbc@postgresql.org" Subject: Re: getXXX methods References: <1088795907.1536.118.camel@localhost.localdomain> <1089145387.1506.65.camel@localhost.localdomain> <1089154614.1508.70.camel@localhost.localdomain> In-Reply-To: <1089154614.1508.70.camel@localhost.localdomain> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.1 tagged_above=0.0 required=5.0 tests=RCVD_IN_SORBS X-Spam-Level: X-Archive-Number: 200407/43 X-Sequence-Number: 10427 Dave Cramer wrote: > I was thinking that parsing the double would be less efficient than > Byte.parseByte(). > > The spec suggests that the user would know what they are doing calling > getByte on a double column. Yeah, specifically table B-6 says you can use getByte() on pretty much any numeric SQL type, and (bizarrely) on varchar, char, longvarchar, and boolean types too. The spec & javadoc for java.sql.DataTruncation implies we should generate DataTruncation as a warning if we truncate data on read. I suppose that loss of precision counts as truncation? -O