Re: Question on cast string to date
От | David G. Johnston |
---|---|
Тема | Re: Question on cast string to date |
Дата | |
Msg-id | CAKFQuwbLsep1xtJ5ESXS1QrtGVwS1z0wFkuFe-SPdqScyLqQfg@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Question on cast string to date (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Question on cast string to date
Re: Question on cast string to date |
Список | pgsql-general |
On Monday, May 9, 2022, Tom Lane <tgl@sss.pgh.pa.us> wrote:
正华吕 <kainwen@gmail.com> writes:
> I test the following SQL in pg15dev (seems same behavior as the
> previous version).
> select '2020701'::date;
> date
> ------------
> 0202-07-01
> (1 row)
> At the first glance, the result seems quite strange.
[ shrug... ] You left out a zero. It's not apparent to me that
this answer is wrong.
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
The goal seemed to be able to accept 5-digit years…this behavior change didn’t show in the tests (or discussion) though I didn’t look for the of testing the pre-existing failure mode.
David J.
В списке pgsql-general по дате отправления: