Relative Content

Tag Archive for databasepostgresqlbyte

byte size of numeric(precision, scale) in postgres

Given that the size is variable, I am trying to calculate the average cost of a numeric(p, s) attribute. In my case, numeric(10, 2).
From what I understand of the postgres documentation, this means I have a total of 10 digits where 2 of them are exclusive of the decimal part, hence, the maximum value I can store is 99999999,99.