Re: Odd sum() problem in 7.2.2
От | Tom Lane |
---|---|
Тема | Re: Odd sum() problem in 7.2.2 |
Дата | |
Msg-id | 24878.1033752996@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Odd sum() problem in 7.2.2 (Richard Huxton <dev@archonet.com>) |
Список | pgsql-general |
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
В списке pgsql-general по дате отправления: