Max value decimal in PostgreSQL Calculate from precision, scale, and length max_value = 10^(precision - scale)