Re: [BUGS] Money type does not detect over/underflow unlike int/int8
Re: [BUGS] Money type does not detect over/underflow unlike int/int8
От:
Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
Дата:
i wrote:
> result = (Cash)f * 100;
> if ((c > 0 && CASH_MAX / c <= result) ||
> (c < 0 && CASH_MIN / c >= result))
> ereport("overflow");ah... this is still wrong. Will be different not so much, though.
regards,
--
Kyotaro Horiguchi
NTT Open Source Software Center