From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: david.perez.ingeniero@gmail.com
Subject: BUG #18470: Time literal accepted in Postgres 15 and below, not accepted in Postgres 16
Date: Fri, 17 May 2024 11:04:53 +0000
Message-ID: <18470-34fad4c829106848@postgresql.org> (raw)
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, david.perez.ingeniero@gmail.com
Subject: Re: BUG #18470: Time literal accepted in Postgres 15 and below, not accepted in Postgres 16
In-Reply-To: <18470-34fad4c829106848@postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox