Re: what data type should be returned by sum(float4)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: what data type should be returned by sum(float4)
Дата
Msg-id 31561.1410142831@sss.pgh.pa.us
обсуждение исходный текст
Ответ на what data type should be returned by sum(float4)  (Kouhei Kaigai <kaigai@ak.jp.nec.com>)
Список pgsql-hackers
Kouhei Kaigai <kaigai@ak.jp.nec.com> writes:
> The documentation says that return type of sum(expression) is...
>   bigint for smallint or int arguments, numeric for bigint arguments,
>   double precision for floating-point arguments, otherwise the same
>   as the argument data type

> Does it expect sum(float4) returns float8, doesn't it?

Good catch!  [ digs in commit history... ]  It looks like the claim
that sum(float4) produces float8 was introduced in my commit
d06ebdb8d3425185d7e641d15e45908658a0177d of 2000-07-17; but it seems
to have been an outright error, because sum(float4) was a separate
aggregate long before that.  Possibly a copy-and-paste mistake from
some other aggregate?  I sure don't remember.
        regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Kouhei Kaigai
Дата:
Сообщение: what data type should be returned by sum(float4)
Следующее
От: Stephen Frost
Дата:
Сообщение: Re: proposal (9.5) : psql unicode border line styles