Re: [DOCS] Add example about date ISO format

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Erik Wienhold <ewie(at)ewie(dot)name>
Cc: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, juha(dot)mustonen(at)iki(dot)fi, pgsql-docs(at)postgresql(dot)org
Subject: Re: [DOCS] Add example about date ISO format
Date: 2023-12-26 20:32:23
Message-ID: ZYs4V6C4lfSzRcsQ@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

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(at)momjian(dot)us> https://momjian.us
EDB https://enterprisedb.com

Only you can decide what is important to you.

In response to

Browse pgsql-docs by date

  From Date Subject
Next Message PG Doc comments form 2023-12-27 22:38:53 string_agg
Previous Message Tom Lane 2023-12-25 18:31:11 Re: Documentation does not describes format for access privileges: =Tc/user