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 1r6Zzc-001Tto-PI for pgsql-docs@arkaria.postgresql.org; Fri, 24 Nov 2023 17:29:28 +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 1r6Zzb-00DEe1-BR for pgsql-docs@arkaria.postgresql.org; Fri, 24 Nov 2023 17:29:27 +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 1r6Zza-00DEbX-UO for pgsql-docs@lists.postgresql.org; Fri, 24 Nov 2023 17:29:27 +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 1r6ZzY-008KCl-69 for pgsql-docs@postgresql.org; Fri, 24 Nov 2023 17:29:26 +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=24aK0aHWEy3Z8FYWku+WKZ5Va/aO/GFwdP5/vc3fpG8=; b=nVsxF NxN+Oj4ulKs2lOVeE/FRh25kxEJas0HWfj9yBn9fnUnu3j3yMGwEbUI8/ckm+sUDRYJZKLbRIru4l SaaxtxzP/qoRjgpbaNraZS76KCxDGQKr5qHYBmqQYN2qTcV1wz7tnvkML8EVg6MrCwhMCsQgchkQQ iYoNTJfE6eNjf4PhV83FBZMzcv1pIjvbcVO0cR/UHrTwXPQgcHz7GF5RWZGKinW6TYGju/A9AcxqF ihzXmNLXRDOxBpmqRIb6GcVby9TQb1CDtZ9t48b6PXIrE0qWLaYj1I8CUe3G3AtbUK7/KegonTj/t HcWFjsMJbLR1q5tXI+Qb1DarW2X+A==; Received: from bruce by momjian.us with local (Exim 4.96) (envelope-from ) id 1r6ZzT-001xgW-1A; Fri, 24 Nov 2023 12:29:19 -0500 Date: Fri, 24 Nov 2023 12:29:19 -0500 From: Bruce Momjian To: Laurenz Albe Cc: Erik Wienhold , juha.mustonen@iki.fi, pgsql-docs@postgresql.org Subject: Re: [DOCS] Add example about date ISO format Message-ID: References: <20170217160154.6101.52806@wrigleys.postgresql.org> <39ac320937098e42241b947ec1165ae2003bc478.camel@cybertec.at> <640f4d61c5b4119870f5ac7ca019da8aa85700d8.camel@cybertec.at> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="T42+g3uLk8eUPpaA" Content-Disposition: inline In-Reply-To: <640f4d61c5b4119870f5ac7ca019da8aa85700d8.camel@cybertec.at> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --T42+g3uLk8eUPpaA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Nov 23, 2023 at 09:29:39AM +0100, Laurenz Albe wrote: > On Wed, 2023-11-22 at 11:58 -0500, Bruce Momjian wrote: > > Okay, I moved it into the "Note" section that talked about ISO 8601 > > output with "T", in the attached patch. > > Fine by me, except that I would rather have "returns" or "produces" > instead of the questionable verb "outputs". The majority of people seem to want it in table 9.31, so I have moved it there. It does almost double the width of the displayed table though. You can see the new output here: https://momjian.us/tmp/pgsql/functions-formatting.html#FUNCTIONS-FORMATTING-EXAMPLES-TABLE Patch attached. -- Bruce Momjian https://momjian.us EDB https://enterprisedb.com Only you can decide what is important to you. --T42+g3uLk8eUPpaA Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="iso.diff" diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 93f068edcf..4c15eed66f 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -8748,6 +8748,12 @@ SELECT regexp_match('abc01234xyz', '(?:(.*?)(\d+)(.*)){1,1}'); to_char(current_timestamp, 'FMDay, FMDD  HH12:MI:SS') 'Tuesday, 6  05:39:18' + + to_char(current_timestamp AT TIME ZONE + 'UTC', 'YYYY-MM-DD"T"HH24:MI:SSZ') + '2022-12-06T05:39:18', + ISO 8601 T format + to_char(-0.1, '99.99') '  -.10' --T42+g3uLk8eUPpaA--