returning set of records in stored procedure
There are a few ways of doing this in PostgreSQL depending on the versions you have to support.  The simplest is:

create or replace function plpgSqlProc () returns setof integer as $$
BEGIN

RETURN QUERY select * from foo;
END;
$$ LANGUAGE PLPGSQL;


This being said, I find where you don't need helper procedural code, plain SQL functions are usually better.  They are usually fast and sometimes they are even planner-transparent.