From ac5a747e953944b97e1c07c4abae8aa6124a93ce Mon Sep 17 00:00:00 2001 From: Federico Di Gregorio Date: Sat, 21 Oct 2006 07:33:44 +0000 Subject: [PATCH] Fixed precision and scale. --- psycopg/pqpath.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/psycopg/pqpath.c b/psycopg/pqpath.c index 561d4f52..9419867e 100644 --- a/psycopg/pqpath.c +++ b/psycopg/pqpath.c @@ -561,7 +561,7 @@ _pq_fetch_tuples(cursorObject *curs) /* 4,5/ scale and precision */ if (ftype == NUMERICOID) { PyTuple_SET_ITEM(dtitem, 4, PyInt_FromLong((fmod >> 16) & 0xFFFF)); - PyTuple_SET_ITEM(dtitem, 5, PyInt_FromLong((fmod & 0xFFFF) - 4)); + PyTuple_SET_ITEM(dtitem, 5, PyInt_FromLong(fmod & 0xFFFF)); } else { Py_INCREF(Py_None);