Re: Bug #443: Problem with time functions.

Поиск
Список
Период
Сортировка
От Thomas Lockhart
Тема Re: Bug #443: Problem with time functions.
Дата
Msg-id 3B9E2872.158D9E85@fourpalms.org
обсуждение исходный текст
Ответ на Bug #443: Problem with time functions.  (pgsql-bugs@postgresql.org)
Ответы Re: Bug #443: Problem with time functions.
Список pgsql-bugs
> timetest=# select  sum(timeend-timebegin) as totaltime from timetest;
> ERROR:  Unable to select an aggregate function sum(time)

Hmm. The underlying math works:

lockhart=# select time '10:01' - time '10:00';
----------
 00:01:00

lockhart=# select sum(time '10:01' - time '10:00');
ERROR:  Unable to select an aggregate function sum(time)

A workaround for this last query is

lockhart=# select sum(cast(time '10:01' - time '10:00' as interval));
  sum
-------
 00:01

hth

OK. Bruce, are you likely to be keeper of a "fix list" for this beta
cycle? This issue should be on it...

                    - Thomas

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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Bug #447: lost connection to back end
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: PostgreSQL 7.1.3 vs. gcc 2.95.4 and GNU libc 2.2.4