I thought maybe to write custom functions and catch those errors, but it cannot be done via CREATE FUNCTION (SQL Functions).Could it be done via native functions in C? Create wrapping functions which call for example to_number() and if errors are throws to return null?