core-jgi/migration-historic/353a-354a/postgresql/372_round.sql

10 lines
186 B
MySQL
Raw Normal View History

CREATE OR REPLACE FUNCTION round (
IN NUMERIC, -- $1 numeric
IN NUMERIC -- $2 numeric
) RETURNS NUMERIC AS
$$
BEGIN
RETURN ROUND($1, cast($2 as integer));
END;
$$ LANGUAGE plpgsql;