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 1w2Rky-000IYj-3A for pgsql-docs@arkaria.postgresql.org; Tue, 17 Mar 2026 10:34:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w2Rkx-000L9b-2t for pgsql-docs@arkaria.postgresql.org; Tue, 17 Mar 2026 10:34:35 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w26IL-009dFU-0L for pgsql-docs@lists.postgresql.org; Mon, 16 Mar 2026 11:39:37 +0000 Received: from mail-ej1-x634.google.com ([2a00:1450:4864:20::634]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w26II-000000000Lo-2Zqy for pgsql-docs@lists.postgresql.org; Mon, 16 Mar 2026 11:39:36 +0000 Received: by mail-ej1-x634.google.com with SMTP id a640c23a62f3a-b9789425fc5so278710066b.1 for ; Mon, 16 Mar 2026 04:39:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1773661175; x=1774265975; darn=lists.postgresql.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=vB6/IAoMAbAZo/slHcKaaIJNqsWiVE1D+nZRsEDLW1s=; b=BdJ5Eu9MQ0JPNHhh+DdT3fSl6pKf2PT0FjMJgbBq18p05z6qVQ+A2hZUGlOkYPyZbc 8EixIzK2n3MT2c/BM9ID7IVygbsGPdtuPER31eAlg5DOc6biPOrfjOJcKZfm7PWY6dY2 Vb9LYMwOWWMnDu+01tcyXX4XiwaWhpIPLhxIpDSt1bbPcM35RH1oa15g1fCsyzSl0rxS z4JZ/cGqXS3FHj35rCT7CKzcNYaVqBoinOreAsLyENG0T8jsrRzCoD/5FqEV8ggnNhp1 yIKvsrzBgw+CAs51OirAYw4R/S84d72aazsctNp5w8wQHW5L0X6cQoHlnRPS2+6e/KoX uG6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773661175; x=1774265975; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=vB6/IAoMAbAZo/slHcKaaIJNqsWiVE1D+nZRsEDLW1s=; b=XF0LXnl76fX2eNVYU6XCtDgGJub+VzalUQ+3hhT9/7ohVqPz2GG15FDcuOVytQvbk0 xw3N7p2Vmlzcf6UFASIHXjYK3PgmO3BTnkwEv5pB9Q8nP33YmDafQcDInX4lxUkaDF7h Vph9bkZ7BFq8FWyPLU/JyBe1GgwaX8GS5agn96ECg3ELPoju/wvzpHcyFxfM/jzVg8ug 14W/GiPKZRGlQz/c3+wunJwl1nRtvVGIFgiWNZuegZ8uj2Si6mq0Sw5AMQtcdGa6FpG7 PB1n+JFQBn6pzSAFeb3LBUOs4Qw6QMbv01bTMa8UHoecQ66vQytAnoHvMS6WeupW1XK5 182A== X-Gm-Message-State: AOJu0Yze0dpR5Dz2iBWfV8vQ/9pG70YumsaQqK+KdQtyxGKSHxbbDhpU qdzWr7/hEkj7jlwgZMX95U18UfJUNYxjn2UpRQz7JHN8FxvFcWmET3h+Y1ADaw== X-Gm-Gg: ATEYQzxeEOQg6+v3RznYOLghhu4cCNeVTlTMFjkJO3T55Iv1VpOmvxuF+Tcv2hFLGc0 qaW/Ic29GzCCUZws6tBpk/w0ZsVQe0TlrVAJ7ZZqT8/+l6HJgoOdNKP57N6eU2pNDKnI21ElWCv WDkd7Fc20F/A2hYYNind4NyBOMuIOYRuUnQzhGPid3ngJYvVcxSIX2G10O2i1SweKjx34nMbSg/ Qgajjm9I96bzvMLSY/HwmYdqGaWz4Zkrb2BVPa9C7xgt3kdY5tkzdwBeLvwreKat54AQY01oRQ6 U9tqYu5aEC1nG+ugjPiH5ClK2rdpSdNKYN+PAy9koYG5VkLNadeghVD1MtYhanQ7uOtIFUIW6Ea 3yn6YHAPAkJqA6TS4IhByg/UZcuPibcemQvTZkchwGg8jEIPKqrLOnT5QrkjO9MtKOp9kxx+Wk+ 2eb6Hi2wHfpf50tljQawJtOrOBs75rzVX/o/Idoi48nSOVWA8HipeNqdwSNFGijx9okg== X-Received: by 2002:a17:907:841:b0:b94:1555:f077 with SMTP id a640c23a62f3a-b9740223e1fmr887785366b.23.1773661174384; Mon, 16 Mar 2026 04:39:34 -0700 (PDT) Received: from [192.168.188.238] ([90.187.87.241]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b978580dbbcsm471461166b.38.2026.03.16.04.39.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 16 Mar 2026 04:39:33 -0700 (PDT) Message-ID: <0efbf18e-165e-4aae-97c1-2137201f0382@gmail.com> Date: Mon, 16 Mar 2026 12:39:32 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: INTERVAL output format for iso_8601 is without dashes To: Tom Lane Cc: pgsql-docs@lists.postgresql.org References: <177315184745.772.13880446320967157412@wrigleys.postgresql.org> <2120277.1773605663@sss.pgh.pa.us> Content-Language: de-DE From: =?UTF-8?Q?Benjamin_Kr=C3=B6ger?= In-Reply-To: <2120277.1773605663@sss.pgh.pa.us> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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​T-4H-5M-6S` while in reality there are no >> dashes: `P1Y2M3D​T4H5M6S` > > It looks correct to me: > > regression=# set intervalstyle TO iso_8601; > SET > regression=# select '-1 year -2 mons +3 days -04:05:06'::interval; > interval > --------------------- > P-1Y-2M3DT-4H-5M-6S > (1 row) > well, judging vom the columns `Year-Month Interval` and `Day-Time Interval` I didn't expect the input for the column `Mixed Interval` to have negative dimensions (since the other two are positive dimensions only). granted, I missed the positive three days :) It might help to see the input values that led to the documented output values. If you look e.g. at the mixed interval output for style `postgres_verbose`, all dimensions are signed exactly opposite to the `iso_8601` style.