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

Поиск
Список
Период
Сортировка
От Thomas Kellerer
Тема When exactly is a TIMESTAMPTZ converted to the sessions time zone?
Дата
Msg-id phgnok$vc9$1@blaine.gmane.org
обсуждение исходный текст
Ответы Re: When exactly is a TIMESTAMPTZ converted to the sessions time zone?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
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.

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.
 

The manual is ambiguous - at least to me

    When a timestamp with time zone value is output, is always converted from UTC
    to the current timezone zone, and displayed as local time in that zone

Does "is output" refer to the output on the client (after receiving a UTC value) or the sending of a converted value?

In this email: https://www.postgresql.org/message-id/19896.1152889217%40sss.pgh.pa.us

Tom Lane states:

    They are converted to local time in the zone specified by the timezone
    configuration parameter before being displayed to the client

but the "before being displayed" could also refer to a conversion on the server.

Could someone enlighten me, please?

Thomas



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

Предыдущее
От: Melvin Davidson
Дата:
Сообщение: Re: How to watch for schema changes
Следующее
От: Tom Lane
Дата:
Сообщение: Re: When exactly is a TIMESTAMPTZ converted to the sessions time zone?