Re: BUG #5484: sum() bug - Mailing list pgsql-bugs

From viras
Subject Re: BUG #5484: sum() bug
Date
Msg-id 621275398647@web78.yandex.ru
Whole thread Raw
In response to Re: BUG #5484: sum() bug  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: BUG #5484: sum() bug  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-bugs
megafon=# \d aaa
Table "public.aaa"
Column | Type | Modifiers
--------+------+-----------
num | real |

Yes, really, on smaller quantity of digits of errors is not present.
What type of the data is better for using? Numbers up to 100000 and accuracy of 2 fractional signs.

30.05.10, 21:43, "Tom Lane" <tgl@sss.pgh.pa.us>:

> "Sergey" <viras@yandex.ru> writes:8849.15+6464.57=15313.72But sum()=15313.7You did not show what datatype you're
summing,but if the column isfloat4 this result wouldn't be surprising.  float4 is only goodto about six decimal digits.
          regards, tom lane 

pgsql-bugs by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: BUG #5487: dblink failed with 63 bytes connection names
Next
From: Robert Haas
Date:
Subject: Re: BUG #5484: sum() bug