Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id A11881E74D9B for ; Tue, 29 Nov 2011 17:36:11 -0400 (AST) Received: from lo.gmane.org ([80.91.229.12]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RVVLS-0006vT-Ex for pgsql-jdbc@postgresql.org; Tue, 29 Nov 2011 21:36:10 +0000 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RVVLF-0007wv-68 for pgsql-jdbc@postgresql.org; Tue, 29 Nov 2011 22:35:53 +0100 Received: from ip-109-41-212-60.web.vodafone.de ([109.41.212.60]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 29 Nov 2011 22:35:53 +0100 Received: from spam_eater by ip-109-41-212-60.web.vodafone.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 29 Nov 2011 22:35:53 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-jdbc@postgresql.org From: Thomas Kellerer Subject: Bug when retrieving money datatype. Date: Tue, 29 Nov 2011 22:36:37 +0100 Lines: 15 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: ip-109-41-212-60.web.vodafone.de User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666 X-Pg-Spam-Score: -5.4 (-----) X-Archive-Number: 201111/109 X-Sequence-Number: 22444 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