Re: Rounding Problems? - Mailing list pgsql-general

From elbriga
Subject Re: Rounding Problems?
Date
Msg-id 1480427004451-5932397.post@n3.nabble.com
Whole thread Raw
In response to Rounding Problems?  (elbriga <gabrielortizlour@gmail.com>)
Responses Re: Rounding Problems?  (Albe Laurenz <laurenz.albe@wien.gv.at>)
List pgsql-general
Thanks for the detailed answer!

Changing the function sinature seams to have solved the problem:
CREATE OR REPLACE FUNCTION ceilDecimal(num numeric) RETURNS float AS
$BODY$
BEGIN
    RETURN CEIL(num * 100) / 100;
END
$BODY$
LANGUAGE 'plpgsql';


SELECT ceilDecimal(0.07);
 ceildecimal
-------------
        0.07




--
View this message in context: http://postgresql.nabble.com/Rounding-Problems-tp5932388p5932397.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


pgsql-general by date:

Previous
From: Albe Laurenz
Date:
Subject: Re: Rounding Problems?
Next
From: Albe Laurenz
Date:
Subject: Re: Rounding Problems?