Re: jdbc rounding value for numeric fields

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: jdbc rounding value for numeric fields
Дата
Msg-id 3503.1243264549@sss.pgh.pa.us
обсуждение исходный текст
Ответ на jdbc rounding value for numeric fields  (Ioana Danes <ioanasoftware@yahoo.ca>)
Список pgsql-jdbc
Ioana Danes <ioanasoftware@yahoo.ca> writes:
>            ps.setDouble(1,2.6999999999999997);

Don't use setDouble.  float8 to numeric conversion only preserves
DBL_DIG (ie, 15 on standard platforms) decimal digits, since that's
the most that can be fully trusted in a float8 value.

            regards, tom lane

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Ioana Danes
Дата:
Сообщение: jdbc rounding value for numeric fields
Следующее
От: Ioana Danes
Дата:
Сообщение: jdbc rounding value for numeric fields