Re: AT TIME ZONE: "convert"?

Поиск
Список
Период
Сортировка
От David Garamond
Тема Re: AT TIME ZONE: "convert"?
Дата
Msg-id 418641C5.7070408@zara.6.isreserved.com
обсуждение исходный текст
Ответ на Re: AT TIME ZONE: "convert"?  (Martijn van Oosterhout <kleptog@svana.org>)
Ответы Re: AT TIME ZONE: "convert"?
Список pgsql-general
Martijn van Oosterhout wrote:
> You misunderstand the TIMESTAMP WITH TIMEZONE type, it doesn't store
> the timezone you gave it, it's just a point in time. Saying AT TIMEZONE
> just converts it to a TIMESTAMP WITHOUT TIMEZONE with the local time it
> was in the timezone you gave it. So you are complaring different
> things. See:

You're right, I forgot that AT TIME ZONE on timestamptz value currently
returns a timestamp, not timestamptz.

I do realize that currently timestamptz doesn't store the timezone
offset/timezone name (thus timestamp and timestamptz both require the
same amount of storage, 8 bytes). But I believe this probably won't be
so in the future. So the question remains, does AT TIME ZONE already do
what it's supposed to do (according to SQL standard, that is) or will
the behaviour be changed in the future? Will AT TIME ZONE returns
timestamptz in the future instead of timestamp, and will the "converted"
timestamp value be the same if compared with '=' operator?

--
dave


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

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: AT TIME ZONE: "convert"?
Следующее
От: raptor
Дата:
Сообщение: spreading the DB?