summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Momjian2001-10-16 13:42:57 +0000
committerBruce Momjian2001-10-16 13:42:57 +0000
commit076026bba990e16a822408c2da9202ddb185650e (patch)
tree047f388c03dfb8bfea83f4a5aadc07a0b5398942
parentcfe01796e6e9a9f644247b6e1810ba95bf89832d (diff)
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
-rw-r--r--src/interfaces/python/pgmodule.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/interfaces/python/pgmodule.c b/src/interfaces/python/pgmodule.c
index 52d10b7ba87..ea077b201a3 100644
--- a/src/interfaces/python/pgmodule.c
+++ b/src/interfaces/python/pgmodule.c
@@ -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;