Aw: Time zone offset in to_char() - Mailing list pgsql-general

From Karsten Hilbert
Subject Aw: Time zone offset in to_char()
Date
Msg-id trinity-d7c2c180-6711-4cd5-86a0-60c7dad52e88-1704985919018@3c-app-gmx-bs12
Whole thread Raw
In response to Time zone offset in to_char()  (Alban Hertroijs <a.hertroijs@nieuwestroom.nl>)
Responses Aw: Time zone offset in to_char()
Re: Time zone offset in to_char()
List pgsql-general
> In the above, I worked around the issue using a couple of user-defined functions in PG. That should give a reasonable
ideaof the desired functionality, but it's not an ideal solution to my problem:
 
> 1). The first function has as a drawback that it changes the time zone for the entire transaction (not sufficiently
isolatedto my tastes), while
 
> 2). The second function has the benefit that it doesn't leak the time zone change, but has as drawback that the time
zoneis now hardcoded into the function definition, while
 
> 3). Both functions need to be created in the caching database before we can use them, while we have several
environmentswhere they would apply (DEV, pre-PROD, PROD).
 

Would a function that dispatches its calls to a suitable array of hard-coded functions based on an IN parameter help
any?
 

Karsten




pgsql-general by date:

Previous
From: Alban Hertroijs
Date:
Subject: Time zone offset in to_char()
Next
From: Karsten Hilbert
Date:
Subject: Aw: Time zone offset in to_char()