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

From Robert Haas
Subject Re: BUG #5484: sum() bug
Date
Msg-id AANLkTimN3N_mrS1dSM7tEx-OJAsYdZZCT6NTYT2CeELy@mail.gmail.com
Whole thread Raw
In response to Re: BUG #5484: sum() bug  (viras <viras@yandex.ru>)
Responses Re: BUG #5484: sum() bug  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
List pgsql-bugs
On Tue, Jun 1, 2010 at 9:24 AM, viras <viras@yandex.ru> wrote:
> 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.

numeric is a good choice to avoid loss of precision, but can be a bit slower.

You could also try float8.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company

pgsql-bugs by date:

Previous
From: viras
Date:
Subject: Re: BUG #5484: sum() bug
Next
From: Robert Haas
Date:
Subject: Re: BUG #5469: regexp_matches() has poor behaviour and more poor documentation