Yeah, but if it's done in a single query you can always cache the whole thing ...
PostgreSQL allows SQL functions to return rowsets with the result being used like a table, too, so the tricks mentioned in regard to returning collections in Oracle should be applicable in PG as well. I already use this feature in our tree (hierarchical query) code.