From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: david.perez.ingeniero@gmail.com, pgsql-bugs@lists.postgresql.org, Tom Lane <tgl@sss.pgh.pa.us>
Subject: Re: BUG #18470: Time literal accepted in Postgres 15 and below, not accepted in Postgres 16
Date: Fri, 17 May 2024 15:46:45 +0200
Message-ID: <202405171346.virffgus6cjg@alvherre.pgsql> (raw)
In-Reply-To: <18470-34fad4c829106848@postgresql.org>
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
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: alvherre@alvh.no-ip.org, tgl@sss.pgh.pa.us
Subject: Re: BUG #18470: Time literal accepted in Postgres 15 and below, not accepted in Postgres 16
In-Reply-To: <202405171346.virffgus6cjg@alvherre.pgsql>
* 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