summaryrefslogtreecommitdiff
path: root/src/pl/plpython/plpython.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2009-08-14 13:12:21 +0000
committerPeter Eisentraut <peter_e@gmx.net>2009-08-14 13:12:21 +0000
commitc74d8a7708d188f06e0c8bdf340847084915138f (patch)
tree73b8fec78c86cae3abb0e94bc4877ec4e69e88c1 /src/pl/plpython/plpython.c
parent79023381920f84370149812df7ce9869f89420d1 (diff)
Domain support in PL/Python
When examining what Python type to convert a PostgreSQL type to on input, look at the base type of the input type, otherwise all domains end up defaulting to string.
Diffstat (limited to 'src/pl/plpython/plpython.c')
-rw-r--r--src/pl/plpython/plpython.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pl/plpython/plpython.c b/src/pl/plpython/plpython.c
index c52e67e6626..ee94b637fe7 100644
--- a/src/pl/plpython/plpython.c
+++ b/src/pl/plpython/plpython.c
@@ -1,7 +1,7 @@
/**********************************************************************
* plpython.c - python as a procedural language for PostgreSQL
*
- * $PostgreSQL: pgsql/src/pl/plpython/plpython.c,v 1.124 2009/08/13 20:50:05 petere Exp $
+ * $PostgreSQL: pgsql/src/pl/plpython/plpython.c,v 1.125 2009/08/14 13:12:21 petere Exp $
*
*********************************************************************
*/
@@ -1641,7 +1641,7 @@ PLy_input_datum_func2(PLyDatumToOb *arg, Oid typeOid, HeapTuple typeTup)
arg->typbyval = typeStruct->typbyval;
/* Determine which kind of Python object we will convert to */
- switch (typeOid)
+ switch (getBaseType(typeOid))
{
case BOOLOID:
arg->func = PLyBool_FromString;