interval bug? - Mailing list pgsql-hackers

From Olivier PRENANT
Subject interval bug?
Date
Msg-id Pine.UW2.4.21.0112241932010.17906-100000@server.pyrenet.fr
Whole thread Raw
List pgsql-hackers
Hi, 

I just felt on this one :

create table radlog (
...
debut timestamp,
fin timestamp,
...)

select extract(YEAR FROM debut) as annee,extract(MONTH FROM debut) as
mois, EXTRACT(EPOCH FROM sum(fin-debut)) as total, EXTRACT(EPOCH FROM
avg(fin - debut)) from radlog where fin is not null;

Fails with '0' bas interval external representation for any debut = fin.

This can also be seen with select now() - now();

This is with 7.1.3

I've not been yet able to test with .2.

Is there any quick patch for 7.1.3

Merry Xmas to you all

Regards

-- 
Olivier PRENANT             Tel:    +33-5-61-50-97-00 (Work)
Quartier d'Harraud Turrou           +33-5-61-50-97-01 (Fax)
31190 AUTERIVE                      +33-6-07-63-80-64 (GSM)
FRANCE                      Email: ohp@pyrenet.fr
------------------------------------------------------------------------------
Make your life a dream, make your dream a reality. (St Exupery)



pgsql-hackers by date:

Previous
From: "Pavlo Baron"
Date:
Subject: Smb to get involved
Next
From: Olivier PRENANT
Date:
Subject: Re: interval bug?