Precision problems with storage of float/double

Поиск
Список
Период
Сортировка
От John Smith
Тема Precision problems with storage of float/double
Дата
Msg-id DUB121-W17AD73873B390AF3AEF384D3170@phx.gbl
обсуждение исходный текст
Ответы Re: Precision problems with storage of float/double  ("Inoue, Hiroshi" <inoue@tpf.co.jp>)
Список pgsql-odbc
Hi,

I have found that floats and doubles that I save to the database with the ODBC driver may lose precision. The exact bit
patternof my double/float is not what is actually saved in the database. This causes difficulties in situations where
youneed to compare current record contents with the actual data that was inserted. 

It appears to be related to conversion from the double/float to text before it is sent to the database.

I made a simple patch that appears to fix the issue (by adding more decimal digits in the string conversion), and a
testcase that tests the issue. 



Вложения

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

Предыдущее
От: John Smith
Дата:
Сообщение: Re: SQL_DATA_AT_EXEC fails for SQL_C_BIGINT and SQL_C_NUMERIC
Следующее
От: Craig Ringer
Дата:
Сообщение: Re: Building psqlODBC installers