From 9e0dcaaaa3f8bc8afd56ded4c58e3cd21de3b908 Mon Sep 17 00:00:00 2001 From: Heng Sin Low Date: Fri, 26 Dec 2008 07:01:40 +0000 Subject: [PATCH] https://sourceforge.net/forum/message.php?msg_id=5896349 --- db/ddlutils/postgresql/functions/round,sql | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 db/ddlutils/postgresql/functions/round,sql diff --git a/db/ddlutils/postgresql/functions/round,sql b/db/ddlutils/postgresql/functions/round,sql new file mode 100644 index 0000000000..45974819a0 --- /dev/null +++ b/db/ddlutils/postgresql/functions/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;