Tests whether the given string is valid input for the specified data type; if not, return the details of the error that would have been thrown.
Signatures & examples
pg_input_error_info ( string text, type text ) → record ( message text, detail text, hint text, sql_error_code text )
Tests whether the given string is valid input for the specified data type; if not, return the details of the error that would have been thrown. If the input is valid, the results are NULL. The inputs are the same as for pg_input_is_valid.
SELECT * FROM pg_input_error_info('42000000000', 'integer') → message | detail | hint | sql_error_code
------------------------------------------------------+--------+------+----------------
value "42000000000" is out of range for type integer | | | 22003