Re: Question on cast string to date - Mailing list pgsql-general

From Tom Lane
Subject Re: Question on cast string to date
Date
Msg-id 4043739.1652162639@sss.pgh.pa.us
Whole thread Raw
In response to Re: Question on cast string to date  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-general
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> On Monday, May 9, 2022, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> If you want to pursue this question, you could start by bisecting
>> to find just which commit changed it and why.

> Manual history inspection of datetime.c
> https://github.com/postgres/postgres/commit/7778ddc7a2d5b006edbfa69cdb44b8d8c24ec1ff

Ah, yeah, that looks plausible -- the previous code allowed 6 digits
YYMMDD or 8 digits YYYYMMDD, the new code allowed >= 6 digits with
2 or more YY followed by MMDD.  So the specific case of YYYMMDD
was rejected before and not after.  Doesn't seem to have been planned,
but it's not so obviously inconsistent that I'd care to break it
again nine years later.  By now, somebody might be depending on it.

            regards, tom lane



pgsql-general by date:

Previous
From: 正华吕
Date:
Subject: Re: Question on cast string to date
Next
From: Kieran McCusker
Date:
Subject: Fedora 36