Fixed precision and scale.

This commit is contained in:
Federico Di Gregorio 2006-10-21 07:33:44 +00:00
parent bfe5b8fe6b
commit ac5a747e95

View File

@ -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);