Moritz Gmelin <moritz(dot)gmelin(at)gmx(dot)de> writes:
> If you take any other month than October, it is working fine. So
> 09-01-2000 + 1 month => 10-01-2000.
Hmm, I was expecting to find that fixed in current sources, but it's
regression=# select ('10-01-2000'::timestamp + ('1 month')::timespan);
Thomas, isn't the addition of '1 month' done symbolically in a struct tm?
I suspect you may have forgotten to set tm_isdst = -1 before invoking
mktime(), causing it to interpret the time of day on the target date
as the same DST or not-DST case that applied on the initial date.
Seems to me that both times should be taken as "local time", so you
should force mktime() to recompute whether DST is in effect or not.
OTOH, it's much less clear whether that's a good idea when the timespan
is expressed in hours... maybe do this only if the timespan had a
nonzero "months" component? (Really, timespans should account for
months, days, and hours separately --- it's false that 1 day == 24 hours
-- so IMHO a reasonable implementation would reset isdst if either the
months or days component was nonzero. I don't have time to fix that for
> P.S. what about a way to cancel a query that is waiting for a locked table / row ?
That works in 7.0.*, no? Sure looks like it works to me:
play=> lock table int4_tbl;
-- type control-C
Cancel request sent
ERROR: Query cancel requested while waiting lock
regards, tom lane
In response to
pgsql-bugs by date
|Next:||From: Tom Lane||Date: 2000-11-02 17:08:18|
|Subject: Re: strange array insertion |
|Previous:||From: Tom Lane||Date: 2000-11-02 16:07:55|
|Subject: Re: Bug#94 is related to compiler-version |