TO_DATE Function unintended behavior when month value is greater than 12 - Mailing list pgsql-bugs

From naidu rongali
Subject TO_DATE Function unintended behavior when month value is greater than 12
Date
Msg-id CACu6o4qMF7K-w0-2nNQxZ6zpi6sBrvVo0AMjcq7cX40yeK4nRA@mail.gmail.com
Whole thread Raw
Responses Re: TO_DATE Function unintended behavior when month value is greaterthan 12
RE: TO_DATE Function unintended behavior when month value is greaterthan 12
List pgsql-bugs
Hi,
I noticed this behavior on recent release of PG database. It will be helpful to users, if this behavior is looked into. 

When executed below SQL, got unintended output when i expected it to throw error " not a valid month "

SQL executed:
select to_date('20171231','YYYYDDMM')

result:
2019-07-17


Thank you, Naidu

pgsql-bugs by date:

Previous
From: Greg Clough
Date:
Subject: RE: BUG #15067: Documentation or behaviour bug with autovacuumthresholds?
Next
From: Pavel Stehule
Date:
Subject: Re: TO_DATE Function unintended behavior when month value is greaterthan 12