Re: Time interval sums - Mailing list pgsql-sql

From Tom Lane
Subject Re: Time interval sums
Date
Msg-id 15325.1159824592@sss.pgh.pa.us
Whole thread Raw
In response to Time interval sums  ("A. R. Van Hook" <hook@lake-lotawana.mo.us>)
List pgsql-sql
"A. R. Van Hook" <hook@lake-lotawana.mo.us> writes:
> How does one sum interval sums?
> the following does not work:
>  select sum(stop-start::interval) as total from startstop

Define "does not work"?  What did you get, what were you hoping for?

Personally I'd drop the unnecessary cast, but AFAICS there are
appropriate operators at least as far back as 7.3.
        regards, tom lane


pgsql-sql by date:

Previous
From: "A. R. Van Hook"
Date:
Subject: Time interval sums
Next
From: Bruno Wolff III
Date:
Subject: Re: How to FindNearest