elbriga wrote: > 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 Yes, because "numeric" stores the exact number, so it will be exactly 0.07 after conversion. Yours, Laurenz Albe -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general