interval bug?

From: Olivier PRENANT <ohp(at)pyrenet(dot)fr>
To: pgsql-hackers list <pgsql-hackers(at)postgresql(dot)org>
Subject: interval bug?
Date: 2001-12-24 18:39:11
Message-ID: Pine.UW2.4.21.0112241932010.17906-100000@server.pyrenet.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)pyrenet(dot)fr
------------------------------------------------------------------------------
Make your life a dream, make your dream a reality. (St Exupery)

Browse pgsql-hackers by date

  From Date Subject
Next Message Olivier PRENANT 2001-12-24 23:04:44 Re: interval bug?
Previous Message Pavlo Baron 2001-12-24 16:26:34 Smb to get involved