atlasdb=# CREATE OR REPLACE PROCEDURE pro_test() AS $$
atlasdb$# DECLARE
atlasdb$# BEGIN
atlasdb$# dbms_output.put_line ('this is a procedure');
atlasdb$# END;
atlasdb$# $$ LANGUAGE plpgsql;
CREATE PROCEDURE
atlasdb=#
atlasdb=# CREATE OR REPLACE FUNCTION fun_test (
atlasdb(# p_sal NUMBER,
atlasdb(# p_comm NUMBER
atlasdb(# ) RETURNs NUMBER
atlasdb-# as $BODY$
atlasdb$# BEGIN
atlasdb$# RETURN (p_sal + NVL(p_comm, 0)) * 24;
atlasdb$# END emp_comp;
atlasdb$# $BODY$;
CREATE FUNCTION
atlasdb=# DO $$ DECLARE
atlasdb$# BEGIN
atlasdb$# fun_test(1,2);
atlasdb$# pro_test();
atlasdb$# END $$;
NOTICE: this is a procedure
DO