pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: 正华吕 <kainwen@gmail.com>
Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: Question on cast string to date
Date: Tue, 10 May 2022 02:03:59 -0400
Message-ID: <4043739.1652162639@sss.pgh.pa.us> (raw)
In-Reply-To: <CAKFQuwbLsep1xtJ5ESXS1QrtGVwS1z0wFkuFe-SPdqScyLqQfg@mail.gmail.com>
References: <CANerzAcbEw0Uvv9APGK4FORGbeJ0ftwtuG6=kNgA_P0NTxa9ew@mail.gmail.com>
	<4035765.1652157883@sss.pgh.pa.us>
	<CAKFQuwbLsep1xtJ5ESXS1QrtGVwS1z0wFkuFe-SPdqScyLqQfg@mail.gmail.com>

"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





view thread (7+ messages)

Message-ID: <4043739.1652162639@sss.pgh.pa.us>
Permalink:  ../4043739.1652162639@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/4043739.1652162639@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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, david.g.johnston@gmail.com, kainwen@gmail.com
  Subject: Re: Question on cast string to date
  In-Reply-To: <4043739.1652162639@sss.pgh.pa.us>
  References: <CANerzAcbEw0Uvv9APGK4FORGbeJ0ftwtuG6=kNgA_P0NTxa9ew@mail.gmail.com> <4035765.1652157883@sss.pgh.pa.us> <CAKFQuwbLsep1xtJ5ESXS1QrtGVwS1z0wFkuFe-SPdqScyLqQfg@mail.gmail.com> <4043739.1652162639@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