Re: Bug while retrieving money data type from db - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: Bug while retrieving money data type from db
Date
Msg-id Pine.BSO.4.64.0802291203510.30735@leary.csoft.net
Whole thread Raw
In response to Bug while retrieving money data type from db  (Andrea Aime <aaime@openplans.org>)
Responses Re: Bug while retrieving money data type from db
List pgsql-jdbc

On Tue, 26 Feb 2008, Andrea Aime wrote:

> I've stumbled into a bug, it seems the driver is not able to
> retrive money data type from the db properly unless a getString
> is used.... unfortunately in my case the code does not know
> what kind of attributes is reading, and it uses getObject instead,
> getting back an exception.


We already knew the support for money in the driver was pretty poor (it
doesn't work for locale's whose currency symbol is not $), but the fact
that it doesn't support separators makes it especially useless.
Since every getInt/Float/... call is paying a performance price for
checking for the money type and doesn't always work, I suggest we rip all
that out and return money as either a String or the PGmoney type.

That will break existing applications that want to be able to do getDouble
on money data, but I'm OK with that because they should be pretty rare.

Kris Jurka


pgsql-jdbc by date:

Previous
From: Kris Jurka
Date:
Subject: Re: Array Char/VarChar Size
Next
From: Daniel Migowski
Date:
Subject: Re: Bug while retrieving money data type from db