Thread: Wierd results of math -- old bug I hope

Wierd results of math -- old bug I hope

From
Josh Berkus
Date:
Folks,

I'm hoping that this is "already fixed" somewhere:

webmergers=# select version();
                                       version
-------------------------------------------------------------------------------------
 PostgreSQL 7.4.3 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.3.3 (SuSE
Linux)
(1 row)

webmergers=# select 3000::NUMERIC*1024*1024;
  ?column?
------------
 3145728000
(1 row)

webmergers=# select 3000*1024*1024;
  ?column?
-------------
 -1149239296
(1 row)


--
__Aglio Database Solutions_______________
Josh Berkus               Consultant
josh@agliodbs.com     www.agliodbs.com
Ph: 415-752-2500    Fax: 415-752-2387
2166 Hayes Suite 200    San Francisco, CA