Обсуждение: 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
Дата:
 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