I'm trying to figure this one out. New to postgresql. But i have a query that i would like to return all the rows it finds from multiple tables.
select a.fname, a.mi, a.lastname, b.address, b.city, c.ssn, c.bday
name as a,
address as b,
misc as c
i have read the setof but the sample i see uses the table name. Since i have multiple tables how do you do it in a stored procedure:
This is the sample i saw.
create function getdata() returns setof foo as $$
select * from foo where;
$$ language sql;