On Jun 7, 2007, at 16:07 , Steve Crawford wrote:
On 8.2 I'm seeing an adjustment if the DST adjustment includes
units of
"day" or greater (ie. '1 day' and '1 day 01:00' get adjusted but '24
hours' and '25 hours' do not).
But PG doesn't follow the same rules in subtracting timestamptz values
so operations involving timestamps and intervals are (sometimes) not
reversible:
Right. It's only for timestamptz +/i interval.
select timestamptz '2007-11-05' - timestamptz '2007-11-04';
?column?
----------------
1 day 01:00:00
It is a bit tricky. Datetime math is inherently so.
select timestamptz '2007-11-04' + interval '1 day 01:00:00';
?column?
------------------------
2007-11-05 01:00:00-08
What PostgreSQL is doing behind the scenes is incrementing the date
2007-11-04 ahead 1 day and 1 hour. It treats months (and years),
days, and time separately.
Michael Glaesemann
grzm seespotcode net
---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly