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-17T21:52:48Z
Lists: pgsql-bugs

Attachments

I wrote:
> So at this point, yeah that's a bug we should fix.
> I'll look into it later if nobody beats me to it.

It is failing because it sees an "unhandled prefix type",
that is ptype still nonzero after the parsing loop
in DecodeTimeOnly.  We need to reset ptype, as is done
in the comparable case in DecodeDateTime.

			regards, tom lane

Commits

  1. Fix input of ISO "extended" time format for types time and timetz.

  2. Tighten error checks in datetime input, and remove bogus "ISO" format.