pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas Kellerer <spam_eater@gmx.net>
To: pgsql-jdbc@postgresql.org
Subject: Bug when retrieving money datatype.
Date: Tue, 29 Nov 2011 22:36:37 +0100
Message-ID: <jb3j7b$s3p$1@dough.gmane.org> (raw)

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




view thread (5+ messages)  latest in thread

Message-ID: <jb3j7b$s3p$1@dough.gmane.org>
Permalink:  ../jb3j7b$s3p$1@dough.gmane.org/
Also on:    postgresql.org/message-id/jb3j7b$s3p$1@dough.gmane.org

 · 

reply

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: spam_eater@gmx.net
  Subject: Re: Bug when retrieving money datatype.
  In-Reply-To: <jb3j7b$s3p$1@dough.gmane.org>
  References: <jb3j7b$s3p$1@dough.gmane.org>

* 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