From: Peter Eisentraut Date: Fri, 14 Aug 2009 13:12:21 +0000 (+0000) Subject: Domain support in PL/Python X-Git-Url: http://git.postgresql.org/gitweb/?a=commitdiff_plain;h=68096ece36e3300ef22696a94fb0aa8c17a57448;p=users%2Fsimon%2Fpostgres.git 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. --- 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;