Re: When exactly is a TIMESTAMPTZ converted to the sessions time zone?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: When exactly is a TIMESTAMPTZ converted to the sessions time zone?
Дата
Msg-id 65821.1530651617@sss.pgh.pa.us
обсуждение исходный текст
Ответ на When exactly is a TIMESTAMPTZ converted to the sessions time zone?  (Thomas Kellerer <spam_eater@gmx.net>)
Ответы Re: When exactly is a TIMESTAMPTZ converted to the sessions timezone?
Список pgsql-general
Thomas Kellerer <spam_eater@gmx.net> writes:
> A recent discussion around timestamptz behaviour has lead me to question my own understanding on how a TIMESTAMPTZ is
convertedto the session's time zone. 
> I assumed this conversion happens *on the server* before the value is sent to the client.

It's done in the datatype's output conversion function.

> A co-worker of mine claims that this is purely a client side thing, and that the server will always send the "plain"
UTCvalue that is stored in a timestamptz column. 

Your co-worker is certainly wrong so far as text output is concerned.
If you retrieve data in binary format, though, it looks like you get
the raw (un-rotated) timestamp value, so that any conversion would have
to be done on the client side.

            regards, tom lane


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

Предыдущее
От: Thomas Kellerer
Дата:
Сообщение: When exactly is a TIMESTAMPTZ converted to the sessions time zone?
Следующее
От: Tim Cross
Дата:
Сообщение: Re: FK v.s unique indexes