PLpgSQL 语法
CREATE [OR REPLACE] FUNCTION functionName (someParameter 'parameterType')
RETURNS 'DATATYPE'
AS $_block_name_$
DECLARE
--declare something
BEGIN
--do something
--return something
END;
$_block_name_$
LANGUAGE plpgsql;
CREATE [OR REPLACE] FUNCTION functionName (someParameter 'parameterType')
RETURNS 'DATATYPE'
AS $_block_name_$
DECLARE
--declare something
BEGIN
--do something
--return something
END;
$_block_name_$
LANGUAGE plpgsql;