> ctrlmdb=> select to_date('2018100X','YYYYMMDD');
> to_date
------------
>2018-10-01
>(1 row)
I am able to reproduce this in 11.5 It seems PG can take a single digit for Day too.
select to_date('2018109','YYYYMMDD') produces 2018-10-09.