Bug when retrieving money datatype.

From: Thomas Kellerer <spam_eater(at)gmx(dot)net>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Bug when retrieving money datatype.
Date: 2011-11-29 21:36:37
Message-ID: jb3j7b$s3p$1@dough.gmane.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Hello,

columns with type "money" are reported as Types.DOUBLE by the JDBC driver.

However using ResultSet.getDouble() (or getObject()) on those columns throws an error:

Bad value for type double : €100,00
(SQL State=22003)

It seems that for money columns, only getString() works properly which doesn't really make sense. It breaks applications which assume that ResultSet.getDouble() can be used on a column that is identified as Types.DOUBLE

I would at least expect ResultSet.getObject() to work properly on those columns.

Regards
Thomas

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Oliver Jowett 2011-11-29 21:51:00 Re: Bug when retrieving money datatype.
Previous Message Kevin Grittner 2011-11-27 17:07:49 Re: eclipse update source?