Re: BUG #5484: sum() bug

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: viras <viras(at)yandex(dot)ru>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5484: sum() bug
Date: 2010-06-01 13:51:27
Message-ID: AANLkTimN3N_mrS1dSM7tEx-OJAsYdZZCT6NTYT2CeELy@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Tue, Jun 1, 2010 at 9:24 AM, viras <viras(at)yandex(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Robert Haas 2010-06-01 13:58:15 Re: BUG #5469: regexp_matches() has poor behaviour and more poor documentation
Previous Message viras 2010-06-01 13:24:06 Re: BUG #5484: sum() bug