PG Doc comments form <[email protected]> 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-2M3DT-4H-5M-6S` while in reality there are no
> dashes: `P1Y2M3DT4H5M6S`
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)
regards, tom lane