Richard Huxton <dev@archonet.com> writes:
> Nothing changed but different numbers of rows returned? Best look at the where
> clause...
> Hmm - "datetime" - tell me sir, are you in a timezone other than Greenwich and
> if you specify timezones explicitly does the problem go away?
It looks to me like 7.2 has a bug in
abstime-to-timestamp-without-time-zone conversion, which is what that
datetime() thing is invoking. In 7.2.3, running in US EST5EDT zone,
I see:
regression=# select abstime '2002-09-01';
abstime
------------------------
2002-09-01 00:00:00-04
(1 row)
regression=# select (abstime '2002-09-01')::timestamp without time zone;
timestamp
---------------------
2002-09-01 08:00:00
^^ !!!
(1 row)
regression=# select (abstime '2002-09-01')::timestamp with time zone;
timestamptz
------------------------
2002-09-01 00:00:00-04
(1 row)
In 7.3beta I get more sensible results:
regression=# select (abstime '2002-09-01')::timestamp without time zone;
timestamp
---------------------
2002-09-01 00:00:00
(1 row)
so I'd say Thomas fixed the bug while he was working on the datetime
types this summer ...
regards, tom lane