BUG #18470: Time literal accepted in Postgres 15 and below, not accepted in Postgres 16
От | PG Bug reporting form |
---|---|
Тема | BUG #18470: Time literal accepted in Postgres 15 and below, not accepted in Postgres 16 |
Дата | |
Msg-id | 18470-34fad4c829106848@postgresql.org обсуждение исходный текст |
Ответы |
Re: BUG #18470: Time literal accepted in Postgres 15 and below, not accepted in Postgres 16
|
Список | pgsql-bugs |
The following bug has been logged on the website: Bug reference: 18470 Logged by: david perez Email address: david.perez.ingeniero@gmail.com PostgreSQL version: 16.3 Operating system: Linux Description: This is the result with Postgres 16: postgres=# select VERSION(); version --------------------------------------------------------------------------------------------------------------------- PostgreSQL 16.3 (Debian 16.3-1.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit (1 row) postgres=# select 'T14:00:00'::time; ERROR: invalid input syntax for type time: "T14:00:00" LINE 1: select 'T14:00:00'::time; And this is the result with Postgres 15: postgres=# select VERSION(); version --------------------------------------------------------------------------------------------------------------------- PostgreSQL 15.7 (Debian 15.7-1.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit (1 row) postgres=# select 'T14:00:00'::time; time ---------- 14:00:00 (1 row) A time literal that begins with the letter "T" isn't accepted anymore. 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
В списке pgsql-bugs по дате отправления: