Set default time zone for displaying dates in a session - Mailing list pgsql-novice

From Basil Bourque
Subject Set default time zone for displaying dates in a session
Date
Msg-id 398F862A-DE62-4223-A8F7-44DF7D6EAFCF@me.com
Whole thread Raw
Responses Re: Set default time zone for displaying dates in a session  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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 by date:

Previous
From: Basil Bourque
Date:
Subject: Re: new to postgreSql
Next
From: Lew
Date:
Subject: Re: Unique constraint on only some of the rows