Re: BUG #18470: Time literal accepted in Postgres 15 and below, not accepted in Postgres 16
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: david.perez.ingeniero@gmail.com, pgsql-bugs@lists.postgresql.org
Date: 2024-05-17T14:37:35Z
Lists: 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
Commits
-
Fix input of ISO "extended" time format for types time and timetz.
- a9a7c2c3e15e 17.0 landed
- 019ea7675c77 16.4 landed
-
Tighten error checks in datetime input, and remove bogus "ISO" format.
- 5b3c5953553b 16.0 cited