Re: BUG #18470: Time literal accepted in Postgres 15 and below, not accepted in Postgres 16

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #18470: Time literal accepted in Postgres 15 and below, not accepted in Postgres 16
Дата
Msg-id 2393945.1715956655@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BUG #18470: Time literal accepted in Postgres 15 and below, not accepted in Postgres 16  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Ответы Re: BUG #18470: Time literal accepted in Postgres 15 and below, not accepted in Postgres 16  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> Hmm, at least the Wikipedia page claims that the leading T should be
> accepted.
> https://en.wikipedia.org/wiki/ISO_8601#Times

>> postgres=# select 'T14:00:00'::time;
>> ERROR:  invalid input syntax for type time: "T14:00:00"

> This changed with commit 5b3c5953553b, "Tighten error checks in datetime
> input, and remove bogus "ISO" format."

Thanks, I was just about to go bisect that for myself.

My recollection is that that commit meant to remove some formats
that we couldn't see any justification for in the ISO 8601 spec.
I'm not sure whether that wikipedia page should be taken
as authoritative, but if we can convince ourselves that
'T14:00:00' really is a thing per 8601, then yeah we should
undo that part.  If it's not a thing per the spec, then I'd
tend to say "sorry, but this was intentional to reduce the
code's propensity to accept garbage".

            regards, tom lane



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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: BUG #18470: Time literal accepted in Postgres 15 and below, not accepted in Postgres 16
Следующее
От: PG Bug reporting form
Дата:
Сообщение: BUG #18472: SELECT FOR UPDATE locking more rows than expected