Skip to content

Instantly share code, notes, and snippets.

@edib
Created December 28, 2016 08:24
Show Gist options
  • Select an option

  • Save edib/3cfafce473d2fad5443e27757e68183a to your computer and use it in GitHub Desktop.

Select an option

Save edib/3cfafce473d2fad5443e27757e68183a to your computer and use it in GitHub Desktop.
simplest plpgsql function example
CREATE OR REPLACE FUNCTION fnsomefunc()
RETURNS void AS
$$
BEGIN
FOR i IN 1 .. 100 LOOP
RAISE NOTICE 'I am counting %',i;
END LOOP;
END;
$$
LANGUAGE 'plpgsql' IMMUTABLE;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment