Re: Bug #443: Problem with time functions.

From: Thomas Lockhart <lockhart(at)fourpalms(dot)org>
To: alex(at)sunrise(dot)radiostudiodelta(dot)it, pgsql-bugs(at)postgresql(dot)org, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Subject: Re: Bug #443: Problem with time functions.
Date: 2001-09-11 15:06:26
Message-ID: 3B9E2872.158D9E85@fourpalms.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Peter Eisentraut 2001-09-11 23:16:17 Re: PostgreSQL 7.1.3 vs. gcc 2.95.4 and GNU libc 2.2.4
Previous Message Peter Eisentraut 2001-09-11 13:17:11 Re: Bug #447: lost connection to back end