| От | w.winter |
|---|---|
| Тема | Re: precision of numeric type |
| Дата | |
| Msg-id | 00a501c27f77$6d3c4f60$667ba8c0@panzerknacker обсуждение |
| Ответ на | precision of numeric type ("w.winter" <w.winter@logitags.com>) |
| Список | pgsql-jdbc |
----- Original Message ----- From: "Barry Lind" <blind@xythos.com> To: "w.winter" <w.winter@logitags.com> Cc: <pgsql-jdbc@postgresql.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
В списке pgsql-jdbc по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера