Advertisement
joaofabioma

function f

May 25th, 2022 (edited)
764
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- FUNCTION: public.f()
  2.  
  3. -- DROP FUNCTION IF EXISTS public.f();
  4.  
  5. CREATE OR REPLACE FUNCTION public.f(
  6.     )
  7.     RETURNS void
  8.     LANGUAGE 'plpgsql'
  9.     COST 100
  10.     VOLATILE PARALLEL UNSAFE
  11. AS $BODY$
  12. begin
  13.     FOR i IN 1..10 LOOP
  14.        raise notice '%', i; -- i will take on the values 1,2,3,4,5,6,7,8,9,10 within the loop
  15.     END LOOP;
  16.    
  17. end;
  18. $BODY$;
  19.  
  20. ALTER FUNCTION public.f()
  21.     OWNER TO postgres;
  22.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement