Hey,
the only straight workaround I know (which is pretty bad)
is to cast down your record to text.
Then you have an array of text, which is manageable.
For this you can either 'flatten' your record into a unique text,
or cast each part of your record to text, then emulate an array of array (you need to know the length of the inner array in your function though).
I used this to emulate a 2D numpy vector (N*3)(for numpy).
You'll need a custom aggregate, like
this one.
The other more sane solution is to pass the information about the row you want to retrieve, and retrieve the row directly within the python.
For instance, here you would pass an array of id of the employee you want to work with.
This is saner, but as a design I don't really like to have specific SQL code into a generic python function.
I agree it is cumbersome, and I also badly miss more powerful input for python function (after all, plpython can already return composite types, which is awesome)
Cheers,
Rémi-C