Thanks to Akina, I found the problem. The error has been on client-side, because I used the following in the INSERT function:
INSERT INTO l12 VALUES (TO_TIMESTAMP('2019-05-23 12:16:50.954276', 'YYYY-MM-DD HH24:MI:SS.ms'))
which fails with the mentioned ERROR: date/time field value out of range: "2019-05-23 12:16:50.954276"
Just remove that TO_TIMESTAMP ...