On 8/5/16 1:14 PM, Tom Lane wrote:
> No, I don't think it's sufficient after a multiplication by 10. That
> would be enough to shift some bits clear out of the word, but there's
> no certainty that the new sign bit would be 1.
>
> The scheme used in scanint8 is safe. But I think it was written t
Peter Eisentraut writes:
> The input function of the money type has no overflow checks:
Ugh.
> (Is checking for < 0 a valid overflow check?
No, I don't think it's sufficient after a multiplication by 10. That
would be enough to shift some bits clear out of the word, but there's
no certainty th
The input function of the money type has no overflow checks:
=> select '12345678901234567890'::money;
money
-
-$13,639,628,150,831,692.72
(1 row)
The tests in the regression test file money.sql are bogus because they
only test the overflow checks of the bi