From 7b730f3935c4bef8c2215edb1a03a2b15f80b2a0 Mon Sep 17 00:00:00 2001 From: Federico Di Gregorio Date: Mon, 9 Nov 2009 09:17:05 +0100 Subject: [PATCH] Fixed float loss of precision --- ChangeLog | 5 +++++ psycopg/adapter_pfloat.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 775b3bcd..30e18b1a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-11-09 Federico Di Gregorio + + * psycopg/adapter_pfloat.c: applied patch from Remy Blankto fix float + loss of precision. + 2009-10-04 Federico Di Gregorio * Release 2.0.13. diff --git a/psycopg/adapter_pfloat.c b/psycopg/adapter_pfloat.c index 10c05bd8..ff1c54c9 100644 --- a/psycopg/adapter_pfloat.c +++ b/psycopg/adapter_pfloat.c @@ -44,7 +44,7 @@ pfloat_str(pfloatObject *self) else if (isinf(n)) return PyString_FromString("'Infinity'::float"); else - return PyObject_Str(self->wrapped); + return PyObject_Repr(self->wrapped); } static PyObject *