Index: src/pl/plpython/plpython.c =================================================================== RCS file: /projects/cvsroot/pgsql/src/pl/plpython/plpython.c,v retrieving revision 1.6 diff -u -r1.6 plpython.c --- src/pl/plpython/plpython.c 2001/10/01 17:53:12 1.6 +++ src/pl/plpython/plpython.c 2001/10/03 18:48:34 @@ -229,6 +229,7 @@ static PyObject *PLyBool_FromString(const char *); static PyObject *PLyFloat_FromString(const char *); static PyObject *PLyInt_FromString(const char *); +static PyObject *PLyLong_FromString(const char *); static PyObject *PLyString_FromString(const char *); @@ -1378,12 +1379,16 @@ case 'i': { if ((strncasecmp("int", type, 3) == 0) && - ((type[3] == '4') || (type[3] == '2') || (type[3] == '8')) && + ((type[3] == '4') || (type[3] == '2')) && (type[4] == '\0')) { arg->func = PLyInt_FromString; return; } + else if ( strcasecmp("int8", type) == 0 ) + { + arg->func = PLyLong_FromString; + } break; } case 'n': @@ -1462,6 +1467,12 @@ if ((*eptr != '\0') || (errno)) return NULL; return PyInt_FromLong(v); +} + +PyObject * +PLyLong_FromString(const char *src) +{ + return PyLong_FromString((char *)src,NULL,0); } PyObject *