Re: Timestamp with and without timezone conversion confusion.

Поиск
Список
Период
Сортировка
От Karsten Hilbert
Тема Re: Timestamp with and without timezone conversion confusion.
Дата
Msg-id 20131002203145.GA4203@hermes.hilbert.loc
обсуждение исходный текст
Ответ на Re: Timestamp with and without timezone conversion confusion.  (Steve Crawford <scrawford@pinpointresearch.com>)
Ответы Re: Timestamp with and without timezone conversion confusion.  (Tim Uckun <timuckun@gmail.com>)
Список pgsql-general
On Wed, Oct 02, 2013 at 10:40:36AM -0700, Steve Crawford wrote:

> >>>The reason for that is that in PostgreSQL there is no time zone
> >>information stored along with a "timestamp with time zone",
> >>it is stored in UTC.
> >A better name might perhaps been "timezone aware timestamp".
> >
> >Karsten
>
> The trouble is that it isn't timezone aware.

INSERT/UPDATE is, SELECT is not :-)

> When I have to explain this I tend to tell people to mentally change
> "timestamp with time zone" to "point-in-time". That "point-in-time"
> data can be represented in many different formats and "localized" to
> different zones but they are all the identical point-in-time.

That is, indeed, a helpful metaphor.

Maybe an explicit statement could be added to the docs
(I just checked 9.3) to the effect that "no, the input
time zone is NOT stored and can NOT be retrieved later,
think of it as a point-in-time".

Karsten
--
GPG key ID E4071346 @ gpg-keyserver.de
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346


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

Предыдущее
От: bricklen
Дата:
Сообщение: Re: partitioning for speed, but query planner ignores
Следующее
От: Tim Uckun
Дата:
Сообщение: Re: Timestamp with and without timezone conversion confusion.