* MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/pl/plpython/plpython.c,v 1.6 2001/10/01 17:53:12 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/pl/plpython/plpython.c,v 1.7 2001/10/04 15:45:49 momjian Exp $
*
*********************************************************************
*/
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 *);
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':
return PyInt_FromLong(v);
}
+PyObject *
+PLyLong_FromString(const char *src)
+{
+ return PyLong_FromString((char *)src,NULL,0);
+}
+
PyObject *
PLyString_FromString(const char *src)
{