Re: T is a mandatory date time separator in RFC3339 but documentation states differently

Поиск
Список
Период
Сортировка
От Erik Wienhold
Тема Re: T is a mandatory date time separator in RFC3339 but documentation states differently
Дата
Msg-id d65bzp5h6j2lroyt3y4t7vlth76hdegjuh67dlsmxqzmzjbvtp@fdc4xs5awb3f
обсуждение исходный текст
Ответ на Re: T is a mandatory date time separator in RFC3339 but documentation states differently  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: T is a mandatory date time separator in RFC3339 but documentation states differently  (Peter Eisentraut <peter@eisentraut.org>)
Список pgsql-docs
On 2023-11-13 17:23 +0100, Tom Lane wrote:
> Erik Wienhold <ewie@ewie.name> writes:
> > On 2023-11-13 15:24 +0100, Erik Wienhold wrote:
> >> I also noticed that when people say "ISO 8601" they usually mean RFC
> >> 3389 or some subset of ISO 8601.
> 
> > Forgot this fine visualization of the differences:
> > https://ijmacd.github.io/rfc3339-iso8601/
> 
> I'm inclined not to change anything here, for a couple of reasons:
> 
> 1. PG accepts a fairly large number of ISO 8601 variants (not all);
> not only the RFC 3339 format.  So s/ISO 8601/RFC 3339/g would be
> incorrect.

I did not say that occurrences of "ISO 8601" should be replaced with
"RFC 3339".  Just that the docs should have a cautionary note about the
SQL standard using a subset of ISO 8601 and that Postgres does not
implement (at the moment) all of its date formats.

> Besides, I think more people know what ISO 8601 is than
> know what RFC 3339 is, so that change would also be confusing.

Fair point.

> 2. If ijmacd's pretty graphic is correct, then what we say about
> 'T' versus space is correct, even if it isn't the whole truth.
> I'm not quite sure that ijmacd is correct, though, because of
> this bit in 3339:
> 
>       NOTE: Per [ABNF] and ISO8601, the "T" and "Z" characters in this
>       syntax may alternatively be lower case "t" or "z" respectively.
> 
> which suggests that 8601 is also case-insensitive.  I don't plan
> to go buy a copy of that spec to find out, though.

I dug up my old copies (1988/2000/2004) from uni (let me know if you're
interested ;)  Lower case is allowed if upper case is not available.
And it doesn't allow space in any edition.  Quote from the 2004 edition:

> 3.4.1 Introduction
>
> NOTE 1   In date and time representations lower case characters may
> be used when upper case characters are not available.
>
> NOTE 2   Encoding of characters for the interchange of dates and times
> is not in the scope of this International Standard.
>
> Unless explicitly allowed by this International Standard the character
> "space" shall not be used in the representations.

Probably still the same in the current edition but I won't pay for that
either.

-- 
Erik



В списке pgsql-docs по дате отправления:

Предыдущее
От: Laurenz Albe
Дата:
Сообщение: Re: Documentation of return values of range functions lower and upper
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: T is a mandatory date time separator in RFC3339 but documentation states differently