On 10/23/19 7:55 AM, Ravi Krishna wrote:
====================
Surprisingly (to me), no….
db=# select to_date('20181501','YYYYMMDD');
to_date
------------
2019-03-03
The above fails in 11.5 SQL Error [22008]: ERROR: date/time field value out of range: "20181501"
Behavior changed in v10:
https://www.postgresql.org/docs/10/release-10.html
"
Make to_timestamp() and to_date() reject out-of-range input fields
(Artur Zakirov)
For example, previously to_date('2009-06-40','YYYY-MM-DD') was accepted
and returned 2009-07-10. It will now generate an error.
"
--
Adrian Klaver
adrian.klaver@xxxxxxxxxxx