If you're trying to do what I think you're trying to do, you might need
to create the temp table before you create the function (in the same
session).
Posting a test case people could look at somewhere would be easier than
reading a bunch of description about the problem.
On Tue, Jun 13, 2006 at
When using a temp table in plpgsql functions that has columns comprised
from many tables populated by joins, how do you specify a temp table return
type when its generated by select into and dropped dynamically? I get an
error when I specify returns setof temp_table. Also when I specify a
perman