money bug - Mailing list pgsql-hackers

From Sferacarta Software
Subject money bug
Date
Msg-id 14635.990104@bo.nettuno.it
Whole thread Raw
List pgsql-hackers
Hi all,

I have this funny result when I tried to multiply a money by a float:

select '($21,474,836.48)'::money / '1.0'::float8;
?column?        
----------------
($./,,),,(-*.,()
(1 row)

select '$21,474,836.47'::money * '2.0'::float8;
?column?        
----------------
($./,,),,(-*.,()
(1 row)

--If I use integer instead of float it gives me an expected overflow
--result:

select '$21,474,836.47'::money * '2'::int4;
?column?
--------
($0.02)
(1 row)

I'm using v6.4 on Linux.

-Jose'-




pgsql-hackers by date:

Previous
From: Dan Gowin
Date:
Subject: SQLJ
Next
From: Sferacarta Software
Date:
Subject: int4 range