Bug in Time/Date routines
Moritz Gmelin <moritz.gmelin@gmx.de>
From: Moritz Gmelin <moritz.gmelin@gmx.de>
To: pgsql-bugs@postgresql.org
Date: 2000-11-02T15:27:16Z
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 ?