Re: BUG #16309: Postgres's ISO 8601 date output is not compliant

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: "cosmotic(at)gmail(dot)com" <cosmotic(at)gmail(dot)com>, "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #16309: Postgres's ISO 8601 date output is not compliant
Date: 2020-03-20 20:09:23
Message-ID: CAKFQuwbpvbK4UUO9kYGm=PTLywHHi2-5s5dqBSau+Lrnu=GD-Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Friday, March 20, 2020, PG Bug reporting form <noreply(at)postgresql(dot)org>
wrote:

> The following bug has been logged on the website:
>
> Bug reference: 16309
> Logged by: Charlie Hayes
> Email address: cosmotic(at)gmail(dot)com
> PostgreSQL version: 11.6
> Operating system: docker
> Description:
>
> Per Postgres's own documentation, ISO 8601 date output is NOT compliant
> (Despite what the style name suggests):
> https://www.postgresql.org/docs/12/datatype-datetime.
> html#DATATYPE-DATETIME-OUTPUT
>
> The existing "Style Specification" name should be changed to something
> other
> than ISO since it is NOT ISO compliant.

Not going to happen. The value in the column is the literal value to
assign to the DateStyle GUC.

If the output from postgres cannot be parsed by a strictly ISO 8601 parser,
> than it should not be considered an ISO 8601 string.

Fair point but its close enough for data interchange purposes. We, like
most systems, are prepared to handle values with and without the “T”.

> A new style should be create that is actually ISO compliant.
>

Doesn't seem worthwhile. We conform to RFC3339 for our output and while we
are stuck with a problematic name there is little apparent demand for
including a strict ISO 8901 format output option since RFC3339 provides
sufficient interoperability. And there is an unideal but doable
alternative via to_char().

David J.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2020-03-22 03:23:03 Re: BUG #16040: PL/PGSQL RETURN QUERY statement never uses a parallel plan
Previous Message PG Bug reporting form 2020-03-20 19:26:18 BUG #16309: Postgres's ISO 8601 date output is not compliant