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.96) (envelope-from ) id 1w1rr3-000fnK-1Q for pgsql-docs@arkaria.postgresql.org; Sun, 15 Mar 2026 20:14:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w1rr1-005buF-0l for pgsql-docs@arkaria.postgresql.org; Sun, 15 Mar 2026 20:14: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.96) (envelope-from ) id 1w1rr1-005bu7-01 for pgsql-docs@lists.postgresql.org; Sun, 15 Mar 2026 20:14:27 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1w1rqy-00000000JTI-3wvM for pgsql-docs@lists.postgresql.org; Sun, 15 Mar 2026 20:14:27 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 62FKENCA2120278; Sun, 15 Mar 2026 16:14:23 -0400 From: Tom Lane To: benjamin.kroeger@gmail.com cc: pgsql-docs@lists.postgresql.org Subject: Re: INTERVAL output format for iso_8601 is without dashes In-reply-to: <177315184745.772.13880446320967157412@wrigleys.postgresql.org> References: <177315184745.772.13880446320967157412@wrigleys.postgresql.org> Comments: In-reply-to PG Doc comments form message dated "Tue, 10 Mar 2026 14:10:47 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <2120276.1773605663.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sun, 15 Mar 2026 16:14:23 -0400 Message-ID: <2120277.1773605663@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk PG Doc comments form writes: > https://www.postgresql.org/docs/current/datatype-datetime.html#DATATYPE-= INTERVAL-OUTPUT > The output format for mixed Interval in style specification iso_8601 is > documented incorrectly. > The documentation says `P-1Y-2M3D=E2=80=8BT-4H-5M-6S` while in reality t= here are no > dashes: `P1Y2M3D=E2=80=8BT4H5M6S` It looks correct to me: regression=3D# set intervalstyle TO iso_8601; SET regression=3D# select '-1 year -2 mons +3 days -04:05:06'::interval; interval = --------------------- P-1Y-2M3DT-4H-5M-6S (1 row) regards, tom lane