Re: BUG #18470: Time literal accepted in Postgres 15 and below, not accepted in Postgres 16
От | Alvaro Herrera |
---|---|
Тема | Re: BUG #18470: Time literal accepted in Postgres 15 and below, not accepted in Postgres 16 |
Дата | |
Msg-id | 202405171346.virffgus6cjg@alvherre.pgsql обсуждение исходный текст |
Ответ на | BUG #18470: Time literal accepted in Postgres 15 and below, not accepted in Postgres 16 (PG Bug reporting form <noreply@postgresql.org>) |
Ответы |
Re: BUG #18470: Time literal accepted in Postgres 15 and below, not accepted in Postgres 16
|
Список | pgsql-bugs |
On 2024-May-17, PG Bug reporting form wrote: > I've read carefully this documentation: > https://www.postgresql.org/docs/current/datatype-datetime.html > > It states that: > > ISO 8601 specifies the use of uppercase letter T to separate the date and > time. PostgreSQL accepts that format on input, but on output it uses a space > rather than T, as shown above. This is for readability and for consistency > with RFC 3339 as well as some other database systems 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." https://git.postgresql.org/cgit/postgresql.git/commit/?id=5b3c5953553bb9fb0b171abc6041e7c7e9ca5b4d There's no test case modified in this commit that specified only a time with no date, so assume this particular change was unintentional. -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/ "Most hackers will be perfectly comfortable conceptualizing users as entropy sources, so let's move on." (Nathaniel Smith) https://mail.gnu.org/archive/html/monotone-devel/2007-01/msg00080.html
В списке pgsql-bugs по дате отправления: