CREATE OR REPLACE FUNCTION myfunction(integer) RETURNS integer AS ' DECLARE nm ALIAS FOR $1; cub INTEGER; BEGIN cub:=nm; WHILE cub <=3 LOOP cub := cub * cub * cub; END LOOP; RETURN cub; END; ' LANGUAGE 'plpgsql'; SELECT myfunction(2); -- 10. Cykly, FOR [ <