--first function
--argument is 2 integers
--prints integers from lowest to highest
create or replace function printnumber(l int, h int)
returns void as $$
declare
i int;
begin
<< outer_loop >>
FOR i IN l..h LOOP
raise notice '%', i;
END loop outer_loop;
end $$language plpgsql;
No comments:
Post a Comment