diff --git a/migration/353a-trunk/372_round.sql b/migration/353a-trunk/372_round.sql new file mode 100644 index 0000000000..8d61dca7e9 --- /dev/null +++ b/migration/353a-trunk/372_round.sql @@ -0,0 +1 @@ +-- just for postgresql diff --git a/migration/353a-trunk/postgresql/372_round.sql b/migration/353a-trunk/postgresql/372_round.sql new file mode 100644 index 0000000000..45974819a0 --- /dev/null +++ b/migration/353a-trunk/postgresql/372_round.sql @@ -0,0 +1,9 @@ +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;