Commit 076026bb authored by Bruce Momjian's avatar Bruce Momjian

Python handle as string all int8 values from postgresql. This could be

view when using the aggregate function count() and function nextval
that returns an int8 value, but in python is represented like string:

>> db.query("select nextval('my_seq')").getresult()
[('2',)]

>> db.query("select count(*) from films").dictresult()
[{'count': '120'}]



Ricardo Caesar Lenzi
parent cfe01796
......@@ -286,6 +286,7 @@ get_type_array(PGresult *result, int nfields)
{
case INT2OID:
case INT4OID:
case INT8OID:
case OIDOID:
typ[j] = 1;
break;
......@@ -1793,6 +1794,7 @@ pgquery_getresult(pgqueryobject * self, PyObject * args)
{
case INT2OID:
case INT4OID:
case INT8OID:
case OIDOID:
typ[j] = 1;
break;
......@@ -1940,6 +1942,7 @@ pgquery_dictresult(pgqueryobject * self, PyObject * args)
{
case INT2OID:
case INT4OID:
case INT8OID:
case OIDOID:
typ[j] = 1;
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment