From: Dave Cramer <pg@fastcrypt.com>
To: Kris Jurka <books@ejurka.com>
Cc: pgsql-jdbc@postgresql.org <pgsql-jdbc@postgresql.org>
Subject: Re: getXXX methods
Date: Tue, 06 Jul 2004 18:56:54 -0400
Message-ID: <1089154614.1508.70.camel@localhost.localdomain> (raw)
In-Reply-To: <Pine.BSO.4.56.0407061559110.373@leary.csoft.net>
References: <1088795907.1536.118.camel@localhost.localdomain>
<Pine.BSO.4.56.0407061336560.12042@leary.csoft.net>
<1089145387.1506.65.camel@localhost.localdomain>
<Pine.BSO.4.56.0407061559110.373@leary.csoft.net>
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.
Dave
On Tue, 2004-07-06 at 17:01, Kris Jurka wrote:
> On Tue, 6 Jul 2004, Dave Cramer wrote:
>
> > Once possibility is to use Double.parseDouble(s).byteValue()
> >
> > so the code would become
> >
> > try
> > {
> > Byte.parseByte(s)
> > }
>
> Why bother with Byte.parseByte at all if you are going to fall back to the
> double parsing anyway? As I mentioned earlier I think it is better to
> throw an Exception rather than to silently alter the returned data.
>
> Kris Jurka
>
>
>
> !DSPAM:40eb133321082025652008!
>
>
--
Dave Cramer
519 939 0336
ICQ # 14675561
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: pg@fastcrypt.com, books@ejurka.com
Subject: Re: getXXX methods
In-Reply-To: <1089154614.1508.70.camel@localhost.localdomain>
References: <1088795907.1536.118.camel@localhost.localdomain> <Pine.BSO.4.56.0407061336560.12042@leary.csoft.net> <1089145387.1506.65.camel@localhost.localdomain> <Pine.BSO.4.56.0407061559110.373@leary.csoft.net> <1089154614.1508.70.camel@localhost.localdomain>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox