From 68096ece36e3300ef22696a94fb0aa8c17a57448 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Fri, 14 Aug 2009 13:12:21 +0000 Subject: 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. --- src/pl/plpython/plpython.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/pl/plpython/plpython.c') diff --git a/src/pl/plpython/plpython.c b/src/pl/plpython/plpython.c index 07da41b01c..cfc22259b8 100644 --- a/src/pl/plpython/plpython.c +++ b/src/pl/plpython/plpython.c @@ -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; -- cgit v1.2.3