I'm trying to create a new postgresql function (stored procedure) and I would like to know which return type I've to use in the following query :
from table1 t1,table2 t2
where t1.pid = t2.pid
I cannot use the return type table1 because the query also returns table2-values.
I've already tried this : RETURNS SETOF "anyelement". But it doesn't work.