From: Kris Jurka <books@ejurka.com>
To: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Fast BigDecimal
Date: Sun, 19 Apr 2009 01:20:11 -0400 (EDT)
Message-ID: <Pine.BSO.4.64.0904190118370.28015@leary.csoft.net> (raw)
In-Reply-To: <Pine.BSO.4.64.0904181954340.31632@leary.csoft.net>
References: <49E72C90.9010903@enterprisedb.com>
<Pine.BSO.4.64.0904181954340.31632@leary.csoft.net>
On Sat, 18 Apr 2009, Kris Jurka wrote:
> On Thu, 16 Apr 2009, Heikki Linnakangas wrote:
>
>> Here's another patch I put together while trying to improve performance for
>> the customer that bumped into the repeated Describe thing yesterday. It
>> speeds up ResultSet.getBigDecimal() with the same fastpath implementation
>> we have for getInt and getLong.
>
> To maintain the same behavior as the current code, you need to handle the
> period more carefully. You must ensure that there is only one and that
> there's at least one other number. Consider the case of SELECT '.' OR SELECT
> '1.......'.
>
For some reason I thought this would be tricky. We just need to track the
total number for periods seen and error out if > 1 or equal to the total
number of characters. I've done that and committed it.
Kris Jurka
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: books@ejurka.com, heikki.linnakangas@enterprisedb.com
Subject: Re: Fast BigDecimal
In-Reply-To: <Pine.BSO.4.64.0904190118370.28015@leary.csoft.net>
References: <49E72C90.9010903@enterprisedb.com> <Pine.BSO.4.64.0904181954340.31632@leary.csoft.net> <Pine.BSO.4.64.0904190118370.28015@leary.csoft.net>
* 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