Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rIE6L-0079Ff-0o for pgsql-docs@arkaria.postgresql.org; Tue, 26 Dec 2023 20:32:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rIE6J-00FNPg-OI for pgsql-docs@arkaria.postgresql.org; Tue, 26 Dec 2023 20:32:31 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rIE6J-00FNPX-Gi for pgsql-docs@lists.postgresql.org; Tue, 26 Dec 2023 20:32:31 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rIE6G-00E1oP-TZ for pgsql-docs@postgresql.org; Tue, 26 Dec 2023 20:32:30 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=momjian.us; s=2023062407; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description; bh=0n6sVsTHJXNajzIqc/JdlKTz5wBP/Yk6TJ/KvZDqQ+g=; b=ijFPV gMxlxVe2a0g/P8M4usYgmsuNGrcpIdpYeuHdIDwpnXD8+YA6znoOjefranUXKDQa6ajZYVKpKBy2n UA0eaKWj+Q1BLafQlFHPg0eUvS1TFXEahQgwvUW1XpLeBnfAy9rpJwngQQ6gY/70dhFDS8eF5B/PK MyCiw1TaRXawgrxG7L8pjIykZOKk2SKash7kyhHg1t/hgSWR9VXOIh4ZyJjrW1Yl2EqzGMnge2KnA 8wyBMsxLCKU8SX09vwPBYAYj9gIWKD96f/Xu6MAkTShMUAgEdk86/F9+pm2foldGhEF+vy0JJwCsP Uk/iz9vVH4NjOCBboZHK3Gk9BWpVw==; Received: from bruce by momjian.us with local (Exim 4.96) (envelope-from ) id 1rIE6B-007qn5-32; Tue, 26 Dec 2023 15:32:23 -0500 Date: Tue, 26 Dec 2023 15:32:23 -0500 From: Bruce Momjian To: Erik Wienhold Cc: Alvaro Herrera , Laurenz Albe , juha.mustonen@iki.fi, pgsql-docs@postgresql.org Subject: Re: [DOCS] Add example about date ISO format Message-ID: References: <202311271422.j6abzoo2x44p@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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 https://momjian.us EDB https://enterprisedb.com Only you can decide what is important to you.