BUG in 7.1.3 (fwd)

From: Alessandro Rossi <alex(at)sunrise(dot)radiostudiodelta(dot)it>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG in 7.1.3 (fwd)
Date: 2001-09-06 21:42:57
Message-ID: Pine.LNX.4.05.10109062342051.32482-100000@sunrise.radiostudiodelta.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


I think I have found a bug in version 7.1.3. (I have installed binary
rpms from postgres site on rh7.1)

Here is the DB and some sample entries.

CREATE TABLE "timetest" (
"id" serial primary key,
"timebegin" time,
"timeend" time
);

insert into timetest (timebegin,timeend) values ('12:00:20','12:01:00');
insert into timetest (timebegin,timeend) values ('14:00:20','14:02:00');
insert into timetest (timebegin,timeend) values ('15:00:00','15:00:40');

WORKS

THIS SELECT DOESN'T WORK:
select sum(timeend-timebegin) as totaltime from timetest;

HERE IS WHAT POSTGRES REPORT:

timetest=# select sum(timeend-timebegin) as totaltime from timetest;
ERROR: Unable to select an aggregate function sum(time)
timetest=# select version();
version
-------------------------------------------------------------
PostgreSQL 7.1.3 on i686-pc-linux-gnu, compiled by GCC 2.96
(1 row)

timetest=#

ON POSTGRES 7.0.3
timetest=# select sum(timeend-timebegin) as totaltime from timetest;
totaltime
-----------
00:03
(1 row)

timetest=# select version();
version
-------------------------------------------------------------
PostgreSQL 7.0.3 on i686-pc-linux-gnu, compiled by gcc 2.96
(1 row)

ascor=#

Hope this can help to fix the BUG!

Alex

Browse pgsql-bugs by date

  From Date Subject
Next Message John Summerfield 2001-09-06 23:46:30 Re: Build problem with CVS version
Previous Message Tom Lane 2001-09-06 20:29:09 Re: Logging problems in PostgreSQL 7.2devel