Re: sum(time) problem

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: sum(time) problem
Дата
Msg-id 11792.1042815784@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: sum(time) problem  (Julian Scarfe <julian.scarfe@ntlworld.com>)
Список pgsql-sql
Julian Scarfe <julian.scarfe@ntlworld.com> writes:
>> It seems I've chosen the wrong type. Or is there another solution?

> Correct diagnosis.  You need the "interval" type, not the "time" type for
> your second field.  Interval is a time difference between two timestamps,
> for example the time between the start and the finish of a race.

Right.  "time" is intended for time-of-day values; so taking the sum
would be a nonsensical operation.
        regards, tom lane


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

Предыдущее
От: Julian Scarfe
Дата:
Сообщение: Re: sum(time) problem
Следующее
От: dev@archonet.com
Дата:
Сообщение: RCF: 2nd draft: A brief guide to Nulls