Proper handling of precision and scale for decimal number types