Re: Fast BigDecimal - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: Fast BigDecimal
Date
Msg-id Pine.BSO.4.64.0904190118370.28015@leary.csoft.net
Whole thread Raw
In response to Re: Fast BigDecimal  (Kris Jurka <books@ejurka.com>)
Responses Re: Fast BigDecimal  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
List pgsql-jdbc

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


pgsql-jdbc by date:

Previous
From: Kris Jurka
Date:
Subject: Re: Fast BigDecimal
Next
From: Heikki Linnakangas
Date:
Subject: Re: Fast BigDecimal