fn checked_cast<T, U>( data: Option<T>, convert: impl Fn(&T) -> Option<U>, ) -> PgWireResult<Option<U>>where T: Display,
Converts a numeric value, rejecting one the target type cannot hold.