Re: A bug in 7.3 jdbc driver now support for PG money type

From: Dave Cramer <pg(at)fastcrypt(dot)com>
To: Michael Andreasen <michael(at)dunlops(dot)com>
Cc: "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: A bug in 7.3 jdbc driver now support for PG money type
Date: 2003-11-03 14:02:25
Message-ID: 1067868145.1622.57.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Michael,

Would it be possible for you to use the getObject() method instead. In
order to support the money type as a double we need to put some code in
to check for the $, and comma's; Given that money is a deprecated type
in postgres this is alot of cycles in the driver to support a case which
will be used sparsely.

Dave

On Fri, 2003-10-31 at 16:55, Michael Andreasen wrote:
> Going a getObject() on a money field with a value over 1,000 causes an
> error;
>
> Bad Double 3,273.65
> at
> org.postgresql.jdbc1.AbstractJdbc1ResultSet.toDouble(AbstractJdbc1ResultSet.java:775)
> at
> org.postgresql.jdbc1.AbstractJdbc1ResultSet.getDouble(AbstractJdbc1ResultSet.java:159)
> at
> org.postgresql.jdbc2.AbstractJdbc2ResultSet.getObject(AbstractJdbc2ResultSet.java:116)
>
> I guess it's the comma!
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 8: explain analyze is your friend
>
>

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Kris Jurka 2003-11-03 14:49:32 Re: ResultSetMetaData implementation
Previous Message Kris Jurka 2003-11-03 10:47:42 Re: Driver.acceptsURL(String) not working correctly