CREATE or replace FUNCTION ftoc9() RETURNS setof structrankmaster2 LANGUAGE 'plpgsql'

 AS' DECLARE

 rowdata pss%rowtype;

BEGIN for i in 1..3 loop

select * into rowdata from pss ;

return next rowdata ;

end loop;

return;

end';

The query should be outside the loop, otherwise you are re-running the query each time :-)

Alex

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Reply via email to