fn parse_error_code(err: &ParseError) -> SqlStateExpand description
Maps a parse/cast ParseError to the appropriate DATA_EXCEPTION (class
22) SQLSTATE. Out-of-range values map to overflow codes and malformed input
maps to invalid-representation codes, in both cases distinguishing datetime
types from everything else, matching PostgreSQL.