pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: david.perez.ingeniero@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18470: Time literal accepted in Postgres 15 and below, not accepted in Postgres 16
Date: Fri, 17 May 2024 10:37:35 -0400
Message-ID: <2393945.1715956655@sss.pgh.pa.us> (raw)
In-Reply-To: <202405171346.virffgus6cjg@alvherre.pgsql>
References: <202405171346.virffgus6cjg@alvherre.pgsql>

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





view thread (5+ messages)  latest in thread

Message-ID: <2393945.1715956655@sss.pgh.pa.us>
Permalink:  ../2393945.1715956655@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2393945.1715956655@sss.pgh.pa.us

 · 

reply

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: tgl@sss.pgh.pa.us, alvherre@alvh.no-ip.org, david.perez.ingeniero@gmail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #18470: Time literal accepted in Postgres 15 and below, not accepted in Postgres 16
  In-Reply-To: <2393945.1715956655@sss.pgh.pa.us>

* 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