AT TIME ZONE and interval arguments

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема AT TIME ZONE and interval arguments
Дата
Msg-id 510A2DDA.60301@2ndquadrant.com
обсуждение исходный текст
Ответы Re: AT TIME ZONE and interval arguments
Re: AT TIME ZONE and interval arguments
Список pgsql-general
Hi all

I'm mildly thrown by this:

regress=> SELECT TIME '04:00' AT TIME ZONE '01:00';
  timezone
-------------
 19:00:00-01
(1 row)

regress=> SELECT TIME '04:00' AT TIME ZONE (INTERVAL '01:00');
  timezone
-------------
 21:00:00+01
(1 row)

regress=> SELECT TIME '04:00' AT TIME ZONE (TEXT '01:00');
  timezone
-------------
 19:00:00-01
(1 row)


and was wondering if anyone knows why the sense of the offset is
reversed for typed intervals vs bare literal or text. Is this another
one of the issues caused by the various standards' disagreements about +
vs - time offsets?

--
 Craig Ringer                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services



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

Предыдущее
От: Stuart Bishop
Дата:
Сообщение: Re: Is there a way to add a detail message in a warning with pl/Python?
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: Optimizing query?