Re: sum(time) problem - Mailing list pgsql-sql

From Tom Lane
Subject Re: sum(time) problem
Date
Msg-id 11792.1042815784@sss.pgh.pa.us
Whole thread Raw
In response to Re: sum(time) problem  (Julian Scarfe <julian.scarfe@ntlworld.com>)
List 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 by date:

Previous
From: Julian Scarfe
Date:
Subject: Re: sum(time) problem
Next
From: dev@archonet.com
Date:
Subject: RCF: 2nd draft: A brief guide to Nulls