On 2023-11-15 15:46 +0100, Tom Lane wrote:
> Erik Wienhold <ewie@ewie.name> writes:
> > On 2023-11-15 12:53 +0100, Peter Eisentraut wrote:
> >> I think we should reframe "ISO" to mean "ISO 9075" and remove all claims of
> >> alignment with ISO 8601 and RFC 3339.
>
> > Agree. So just list the example inputs without any reference to a
> > particular standard, except for ISO 9075 to show that Postgres is
> > SQL-standard-compliant?
>
> I think that would remove useful context without actually improving
> anything. (The datetime input code would be far simpler if it
> meant only to read the exact format mentioned in the SQL spec.)
I wrote the attached patch to hopefully clarify the ISO 8601 references.
The two main changes are:
* Making explicit references to ISO 8601:2004 where section numbers are
referenced. Mostly in source comments but also a couple of places in
the docs. This is about avoiding confusion as ISO 8601:2019 has been
published since then, with different section numbers[1]. The pre-2004
editions also have different section numbers. References to general
ISO 8601 concepts (e.g. week numbers) are left unchanged because those
are not tied to any particular edition.
* Remove the claim that the SQL standard requires ISO 8601 formats as
clarified by Peter Eisentraut. I left the general references to ISO
8601 and RFC 3339 because those relate to the date format that
Postgres implements in addition to the standard SQL formats. Also
change time zone input samples that are described as ISO 8601 but do
not match the standard format.
[1] https://www.iso.org/obp/ui/en/#iso:std:iso:8601:-1:ed-1:v1:en
--
Erik