Re: Rounding Problems?

From: elbriga <gabrielortizlour(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Rounding Problems?
Date: 2016-11-29 13:43:24
Message-ID: 1480427004451-5932397.post@n3.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Albe Laurenz 2016-11-29 13:58:27 Re: Rounding Problems?
Previous Message Albe Laurenz 2016-11-29 13:09:25 Re: Rounding Problems?