Re: BUG #5484: sum() bug

From: viras <viras(at)yandex(dot)ru>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5484: sum() bug
Date: 2010-06-01 13:24:06
Message-ID: 621275398647@web78.yandex.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)sss(dot)pgh(dot)pa(dot)us>:

> "Sergey" <viras(at)yandex(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Robert Haas 2010-06-01 13:51:27 Re: BUG #5484: sum() bug
Previous Message Heikki Linnakangas 2010-06-01 09:00:23 Re: BUG #5487: dblink failed with 63 bytes connection names