Re: BUG #5484: sum() bug

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: BUG #5484: sum() bug
Дата
Msg-id AANLkTimN3N_mrS1dSM7tEx-OJAsYdZZCT6NTYT2CeELy@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #5484: sum() bug  (viras <viras@yandex.ru>)
Ответы Re: BUG #5484: sum() bug
Список 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 по дате отправления:

Предыдущее
От: viras
Дата:
Сообщение: Re: BUG #5484: sum() bug
Следующее
От: Robert Haas
Дата:
Сообщение: Re: BUG #5469: regexp_matches() has poor behaviour and more poor documentation