This task is a part of dj's GSoC project.
Let's denote the query that uses a table function
as the caller query.
We are not able to execute table functions, yet. Let's make the first step: the code should create a temporary table according to the definition in CREATE FUNCTION ... RETURNS TABLE statement, and pass it to the caller query.
In other words, the caller query should execute as if table_func returned an empty table.
The code inside table_func is irrelevant as far as this task goes. It can be empty or contain some dummy statement.