The attached patch allows 'select foo()' as well as 'select * from foo()' where foo() is a plperl function that returns a single composite.
cheers
andrew