Re: Question on cast string to date

2022-05-09 Thread Tom Lane
"David G. Johnston" writes: > On Monday, May 9, 2022, Tom Lane 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/7778ddc7a2d5b006edbf

Re: Question on cast string to date

2022-05-09 Thread 正华吕
Thanks all. David G. Johnston 于2022年5月10日周二 13:41写道: > On Monday, May 9, 2022, Tom Lane wrote: > >> =?UTF-8?B?5q2j5Y2O5ZCV?= writes: >> > I test the following SQL in pg15dev (seems same behavior as the >> > previous version). >> > select '2020701'::date; >> > date >> >-

Re: Question on cast string to date

2022-05-09 Thread David G. Johnston
On Monday, May 9, 2022, Tom Lane wrote: > =?UTF-8?B?5q2j5Y2O5ZCV?= 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,

Re: Question on cast string to date

2022-05-09 Thread Tom Lane
=?UTF-8?B?5q2j5Y2O5ZCV?= 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

Re: Question on cast string to date

2022-05-09 Thread Ian Lawrence Barwick
2022年5月10日(火) 13:28 正华吕 : > > Hi, > > 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. > >Go through th

Re: Question on cast string to date

2022-05-09 Thread Pavel Stehule
út 10. 5. 2022 v 6:28 odesílatel 正华吕 napsal: > Hi, > > 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. >

Question on cast string to date

2022-05-09 Thread 正华吕
Hi, 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. Go through the code, postgres use date_in to do the cast, and firs