Bug in Time/Date routines - Mailing list pgsql-bugs

From Moritz Gmelin
Subject Bug in Time/Date routines
Date
Msg-id 200011021527.eA2FRJl35826@mail.postgresql.org
Whole thread Raw
Responses Re: Bug in Time/Date routines
List pgsql-bugs
Hi Folks !

I just found a bug in the postgresql time/date routines.

Try the following in the psql shell :

select ('10-01-2000'::date + ('1 month')::timespan)::date;

The result is going to be

10-31-2000

But it should be

11-01-2000

If you take any other month than October, it is working fine. So 09-01-2000 + 1 month => 10-01-2000.

I've tested this with postgresql 6.5.3 as well as 7.0.2

Thanks for the good work....

Moritz

P.S. what about a way to cancel a query that is waiting for a locked table / row ?

pgsql-bugs by date:

Previous
From: Lamar Owen
Date:
Subject: Re: RPM install weirdness & BugreportPage Bug
Next
From: Tom Lane
Date:
Subject: Re: Bug#94 is related to compiler-version