According to the documentation, numeric is stored without any leading or trailing zeros. http://www.postgresql.org/docs/current/static/datatype-numeric.html Numeric values are physically stored without any extra leading or trailing zeroes. Thus, the declared precision and scale of a column are maximums, not fixed allocations. (In this sense the numeric type is more akin to varchar(n) than to char(n).) The actual storage requirement is two bytes for each group of four decimal digits, plus eight bytes overhead.However, in practice: create table test(f1 numeric); insert into test(f1)values(15.000); select * from test; f1 ------- 15.000 |
- [GENERAL] cast numeric with scale and precision to numeric p... Sim Zacks
- Re: [GENERAL] cast numeric with scale and precision to ... Tom Lane
- Re: [GENERAL] cast numeric with scale and precision... Sim Zacks
- Re: [GENERAL] cast numeric with scale and preci... Adrian Klaver
- Re: [GENERAL] cast numeric with scale and preci... Tom Lane
- Re: [GENERAL] cast numeric with scale and p... Sim Zacks
- Re: [GENERAL] cast numeric with scale ... Scott Marlowe
- Re: [GENERAL] cast numeric with scale ... Adrian Klaver
- Re: [GENERAL] cast numeric with scale and precision to ... Scott Bailey
