diff options
Diffstat (limited to 'src/pl/plpython/plpython.c')
-rw-r--r-- | src/pl/plpython/plpython.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/pl/plpython/plpython.c b/src/pl/plpython/plpython.c index 71f15a3d11..847c81df92 100644 --- a/src/pl/plpython/plpython.c +++ b/src/pl/plpython/plpython.c @@ -23,6 +23,7 @@ #include "nodes/makefuncs.h" #include "parser/parse_type.h" #include "tcop/tcopprot.h" +#include "utils/builtins.h" #include "utils/lsyscache.h" #include "utils/memutils.h" #include "utils/syscache.h" @@ -1873,6 +1874,7 @@ PLy_spi_prepare(PyObject * self, PyObject * args) for (i = 0; i < nargs; i++) { char *sptr; + List *names; HeapTuple typeTup; Form_pg_type typeStruct; @@ -1882,9 +1884,13 @@ PLy_spi_prepare(PyObject * self, PyObject * args) sptr = PyString_AsString(optr); /* - * XXX should extend this to allow qualified type names + * Parse possibly-qualified type name and look it up in + * pg_type */ - typeTup = typenameType(makeTypeName(sptr)); + names = stringToQualifiedNameList(sptr, + "PLy_spi_prepare"); + typeTup = typenameType(NULL, + makeTypeNameFromNameList(names)); Py_DECREF(optr); optr = NULL; /* this is important */ |