From: | "w(dot)winter" <w(dot)winter(at)logitags(dot)com> |
---|---|
To: | <pgsql-jdbc(at)postgresql(dot)org> |
Subject: | Re: precision of numeric type |
Date: | 2002-10-29 18:17:14 |
Message-ID: | 00a501c27f77$6d3c4f60$667ba8c0@panzerknacker |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
----- Original Message -----
From: "Barry Lind" <blind(at)xythos(dot)com>
To: "w.winter" <w(dot)winter(at)logitags(dot)com>
Cc: <pgsql-jdbc(at)postgresql(dot)org>
Sent: Tuesday, October 29, 2002 5:53 PM
Subject: Re: [JDBC] precision of numeric type
> >
> > I store the Double value 1212121234.5634349876 with a
> > PreparedStatement.setDouble()
> >
>
> But the problem is that java Double isn't able to perform calculations
> exactly. If you want exact precision you should be using the BigDecimal
> datatype (and getBigDecimal/setBigDecimal). BigDecimal is the logical
> java data type that corresponds to the numeric type in postgres.
>
Hi Barry,
you are right, that was my error. I will use BigDecimal in this case.
thank you for the hint
Wolfgang
From | Date | Subject | |
---|---|---|---|
Next Message | Kris Jurka | 2002-10-29 18:37:49 | Re: DatabaseMetaData.getTables() problem |
Previous Message | Barry Lind | 2002-10-29 17:16:54 | Re: notification support |