Re: getXXX methods

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: pg(at)fastcrypt(dot)com
Cc: Kris Jurka <books(at)ejurka(dot)com>, "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: getXXX methods
Date: 2004-07-06 23:40:15
Message-ID: 40EB385F.9030704@opencloud.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

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

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Dave Cramer 2004-07-07 01:01:35 Re: getXXX methods
Previous Message Dave Cramer 2004-07-06 22:56:54 Re: getXXX methods