money bug

Started by Sferacarta Softwareabout 27 years ago1 messages
#1Sferacarta Software
sferac@bo.nettuno.it

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'-