Set default time zone for displaying dates in a session

Поиск
Список
Период
Сортировка
От Basil Bourque
Тема Set default time zone for displaying dates in a session
Дата
Msg-id 398F862A-DE62-4223-A8F7-44DF7D6EAFCF@me.com
обсуждение исходный текст
Ответы Re: Set default time zone for displaying dates in a session  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-novice
Is there a way to set a different time zone as the default for a session?

By default, Postgres displays my data stored in "TIMESTAMP WITH TIME ZONE" columns' data as a local time for the time
zoneof the computer hosting the Postgres cluster. 

If my Postgres server is in Seattle, but my user is in New York, I want the times shown in New York time zone.

I know about using the "AT TIME ZONE" command. But:

(a) I would rather set the time zone once in each database connection/session rather than include it in all my
individualSQL calls. 

(b) When using "TABLE myTable;" or "SELECT * FROM myTable;", I cannot specify "AT TIME ZONE".

--Basil Boruque



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

Предыдущее
От: Basil Bourque
Дата:
Сообщение: Re: new to postgreSql
Следующее
От: Lew
Дата:
Сообщение: Re: Unique constraint on only some of the rows