HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlMinor

Is it possible to set timezone for a schema - Postgresql

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
postgresqltimezonesetpossibleforschema

Problem

Is it possible to set the timezone for one schema? Do not want to set Postgresql(v.12) server level.

Please suggest if any ways to this.

Solution

No.

You can either set the timezone at database level, or at session level (... or directly when accessing a date-like datatype, using the at time zone construct).

From the documentation:

The TimeZone configuration parameter can be set in the file postgresql.conf, or in any of the other standard ways described in Chapter 19. There are also some special ways to set it:

-
The SQL command SET TIME ZONE sets the time zone for the session. This is an alternative spelling of SET TIMEZONE TO with a more SQL-spec-compatible syntax.

-
The PGTZ environment variable is used by libpq clients to send a SET TIME ZONE command to the server upon connection.

Context

StackExchange Database Administrators Q#267735, answer score: 3

Revisions (0)

No revisions yet.