clueboy / pymssql_issues

0 stars 0 forks source link

Precision problems #79

Closed clueboy closed 11 years ago

clueboy commented 11 years ago

From dieterv77 on December 29, 2011 06:43:00

I found that saving doubles to a SQLServer database via pymssql resulted in a loss of precision. Specifically, if i retrieve a double after saving it, it only matches up to around 8 digits (which is approximately what you can expect from single precision, instead of double precision). I also found that doubles were translated to strings using str instead of repr. Python only guarantees that float(repr(x)) == x, not that float(str(x)) == x.

I created a fork of this project that includes two changes related to precision. The fork is http://code.google.com/r/dieterv77-pymssql/ and the commit is 4c3e2271dd7e.

There is also a unrelated, minor speed improvement in commit bd9a2213b632.

Thanks very much

Original issue: http://code.google.com/p/pymssql/issues/detail?id=79

clueboy commented 11 years ago

From rsyring on March 08, 2012 06:47:56

Thanks for the report, looks like good changes.

Status: Accepted

clueboy commented 11 years ago

From rsyring on April 03, 2012 10:08:07

Status: Fixed