From: Tom Lane <tgl@sss.pgh.pa.us>
To: A. R. Van Hook <hook@lake-lotawana.mo.us>
Cc: General Postgresql List <pgsql-sql@postgresql.org>
Subject: Re: Time interval sums
Date: Mon, 02 Oct 2006 17:29:52 -0400
Message-ID: <15325.1159824592@sss.pgh.pa.us> (raw)
In-Reply-To: <45217D8D.7060106@lake-lotawana.mo.us>
References: <45217D8D.7060106@lake-lotawana.mo.us>
"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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, hook@lake-lotawana.mo.us
Subject: Re: Time interval sums
In-Reply-To: <15325.1159824592@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox