Re: possible time change issue - known problem?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: possible time change issue - known problem?
Дата
Msg-id 6044.1049731513@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: possible time change issue - known problem?  ("Dan Langille" <dan@langille.org>)
Ответы Re: possible time change issue - known problem?  (Patrick Welche <prlw1@newn.cam.ac.uk>)
Список pgsql-general
"Dan Langille" <dan@langille.org> writes:
> OK, I'll say again.  The problem was not present on my 7.3.2 box but
> was on the 7.2.3 box.

Oh, I see: you're not testing the right thing.  In 7.3, 'date - interval'
promotes to 'timestamp without time zone - interval':

regression=# select current_date, (current_date - interval '24 hours');
    date    |      ?column?
------------+---------------------
 2003-04-07 | 2003-04-06 00:00:00
(1 row)

which is a crude but effective way of sidestepping the issue.  But if
you do the same calculation 7.2 did:

regression=# select current_date, (current_date::timestamptz - interval '24 hours');
    date    |        ?column?
------------+------------------------
 2003-04-07 | 2003-04-05 23:00:00-05
(1 row)

you'll still get the same unwanted result.

            regards, tom lane


В списке pgsql-general по дате отправления:

Предыдущее
От: "Dan Langille"
Дата:
Сообщение: Re: possible time change issue - known problem?
Следующее
От: Walt H
Дата:
Сообщение: ODBC and LO questions....again.