On Thu, Dec 7, 2023 at 02:18:28PM -0500, Bruce Momjian wrote:
> Yes, there were a few problems with my initial patch. First, I should
> have used "Z" instead of a Z which could be interpreted as a format
> specification; I had already done that for "T" in the example.
>
> Second, I was missing the trailing "Z" in the output --- not sure how
> that happened.
>
> Erik and Alvaro made a great point --- we are using a literal "Z" as the
> time zone output specification, but as Alvaro pointed out, there is no
> way to get the time zone _name_ or even the offset from the AT TIME ZONE
> value, so we must just pass the literal "Z" from the input to the output.
> This proves Alvaro's point on this issue:
>
> SELECT pg_typeof(current_timestamp AT TIME ZONE 'America/Santiago');
> pg_typeof
> -----------------------------
> timestamp without time zone
>
> Updated patch attached. Thank you for the feedback.
Patch applied to master. Thanks for all the suggestions.
--
Bruce Momjian <bruce@momjian.us> https://momjian.us
EDB https://enterprisedb.com
Only you can decide what is important to you.