--- plpython.sgml 2009-12-19 23:23:21.000000000 +0100 +++ plpython-new.sgml 2010-01-31 13:17:20.000000000 +0100 @@ -693,6 +693,41 @@ + + Limitations and Work-arounds + + + + + The result of execute() on a SELECT + is a list of dictionary-like objects whose values corresponding to simple + database types are of the corresponding Python type. Unfortunately + however, values corresponding to composite types are returned as string + representations of the composite value. + That is, PL/Python flattens all composite type + values to strings. + + + Work-arounds: (1) Do a SELECT whose result is the + values of the composite entry. (2) Parse up the result strings. + + + + + + PL/Python functions cannot return either type + RECORD or SETOF RECORD. + + + One work-around is to write a PL/pgSQL function + that creates a temporary table, have it call the + PL/Python function to fill the table, + then have function PL/pgSQL function return the + generic RECORD from the temporary table. + + + +