Skip to content

Instantly share code, notes, and snippets.

@emoseman
Created August 27, 2012 14:21
Show Gist options
  • Save emoseman/3488867 to your computer and use it in GitHub Desktop.
Save emoseman/3488867 to your computer and use it in GitHub Desktop.
postgresql create function
-- DROP FUNCTION IF EXISTS function name;
CREATE FUNCTION function name (
argument types
)
RETURNS return type
AS $$
DECLARE
function scope variables
BEGIN
function contents
END;
$$ LANGUAGE 'plpgsql';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment