diff --git a/psycopg/cursor_type.c b/psycopg/cursor_type.c index 8cc391bc..494c15de 100644 --- a/psycopg/cursor_type.c +++ b/psycopg/cursor_type.c @@ -497,7 +497,7 @@ psyco_curs_executemany(cursorObject *self, PyObject *args, PyObject *kwargs) { PyObject *operation = NULL, *vars = NULL; PyObject *v, *iter = NULL; - int rowcount = 0; + long rowcount = 0; static char *kwlist[] = {"query", "vars_list", NULL}; diff --git a/psycopg/pqpath.c b/psycopg/pqpath.c index 3cd62e8d..58cd8c58 100644 --- a/psycopg/pqpath.c +++ b/psycopg/pqpath.c @@ -1241,7 +1241,7 @@ _read_rowcount(cursorObject *curs) if (!rowcount || !rowcount[0]) { curs->rowcount = -1; } else { - curs->rowcount = atoi(rowcount); + curs->rowcount = atol(rowcount); } }