BigDecimal - Mailing list pgsql-jdbc

From Glenn Holmer
Subject BigDecimal
Date
Msg-id 3C67D919.4070908@weycogroup.com
Whole thread Raw
Responses Re: BigDecimal
Re: BigDecimal
List pgsql-jdbc
We're starting a Java project for our retail stores using Postgres,
and would like to store BigDecimal values for price, payment, etc.
because the data will be exported to an IBM iSeries server ("AS/400").
What is the correct Postgres data type to use?  I would assume
"decimal"; when the docs say "User-specified precision" with a range
of "~8000 digits" does that mean the decimal point can fall anywhere
within those 8000 digits?

I was able to write a BigDecimal into a field of type "decimal" using

statement.executeQuery("INSERT INTO TEST VALUES(" + myBigDecimal + ")");

but when I try to read using ResultSet.getBigDecimal(), I get an
error message saying it's not implemented.  We're using Postgres
7.0.3 on SuSE Linux.  Should we upgrade to 7.1?  I realize 7.2 just
came out, but we prefer to install from SuSE RPMs, which I don't
think are available yet.  Or is there a later driver that implements
this, that we could use with 7.0 or 7.1?

--
____________________________________________________________
Glenn Holmer                          gholmer@weycogroup.com
Programmer/Analyst                       phone: 414.908.1809
Weyco Group, Inc.                          fax: 414.908.1601


pgsql-jdbc by date:

Previous
From: "Nick Fankhauser"
Date:
Subject: Re: JDBC split and move ...
Next
From: "Dave Cramer"
Date:
Subject: Re: BigDecimal