postgresql numeric type without trailing zeros
问题 When use numeric type, for example like this numeric(4,2) and if store in him number 1.2 , at end of number are adding zeros for filling scale part right? that is result is 1.20 There is possible to save "short" scale as "short"? that is without adding zeros at end ? 回答1: You shouldn't worry about extra space used for scale part. According to documentation values of numeric type saved without trailing zeroes: Numeric values are physically stored without any extra leading or trailing zeroes.