Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search archives
  Advanced Search

Re: Bug while retrieving money data type from db


  • From: Kris Jurka <books(at)ejurka(dot)com>
  • To: Andrea Aime <aaime(at)openplans(dot)org>
  • Cc: pgsql-jdbc(at)postgresql(dot)org
  • Subject: Re: Bug while retrieving money data type from db
  • Date: Fri, 29 Feb 2008 12:09:52 -0500 (EST)
  • Message-id: <Pine.BSO.4.64.0802291203510.30735@leary.csoft.net> <text/plain>



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




Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group