Bug in Time/Date routines

From: Moritz Gmelin <moritz(dot)gmelin(at)gmx(dot)de>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Bug in Time/Date routines
Date: 2000-11-02 15:27:16
Message-ID: 200011021527.eA2FRJl35826@mail.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 ?

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2000-11-02 16:07:55 Re: Bug#94 is related to compiler-version
Previous Message Lamar Owen 2000-11-02 15:03:00 Re: RPM install weirdness & BugreportPage Bug