This question is related to an earlier one: Why is selecting from stored procedure not supported in relational databases?
On SQL Server you cannot perform a join to (or a select from) a stored procedure (please note: a stored procedure is distinctly different from a function (table-valued function in SQL Server terminology) - with a function, you know the columns being returned at design time, but with a procedure, the specific columns to be returned are not known until runtime).
With SQL Server, there does exist a "generally not allowed by DBA's" method where one can accomplish such a join: OPENROWSET
So the questions are:
Can PostgreSQL perform a join between two procedures where the columns are not known until runtime?
Can it do the same, except using stored procedures that reside in an external 3rd party database (perhaps via foreign data wrappers or some other mechanism)?
OPENROWSET
because it means no optimization or indexing is possible and all data has to be processed in a cursor-like (ie slow) loop. – Flossie