Re: BUG #3586: Time zone problem in SQL query

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #3586: Time zone problem in SQL query
Дата
Msg-id 12062.1188426633@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #3586: Time zone problem in SQL query  ("George Wright" <george.wright@infimatic.com>)
Список pgsql-bugs
"George Wright" <george.wright@infimatic.com> writes:
> badger=> select logid, starttime from tz where starttime BETWEEN '2007-01-22
> 02:30:00-03' and '2007-01-23 03:00:00-03';
>  logid |       starttime
> -------+------------------------
>      1 | 2007-01-22 23:00:00-06 <- is this right?

Why not?  2007-01-22 02:30:00-03 equates to 2007-01-21 23:30:00-06,
so it's before that time, and 2007-01-23 03:00:00-03 equates to
2007-01-23 00:00:00-06, so it's after.

> badger=> select logid, starttime from tz where starttime BETWEEN '2007-01-22
> 00:30:00-05' and '2007-01-23 01:00:00-05';
> badger=> select logid, starttime from tz where starttime BETWEEN '2007-01-22
> 23:30:00-06' and '2007-01-23 00:00:00-06';

Notice you forgot to adjust the date in the first value here, so these
are not equivalent boundary times.

            regards, tom lane

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

Предыдущее
От: Cyrus Downey
Дата:
Сообщение: Re: BUG #3587: EXECUTE and trigger problem [VASCL:A163D284A86]
Следующее
От: "Richard Harris"
Дата:
Сообщение: BUG #3588: coalesce not working in join