3 ms·
You know there's a numeric type in postgres? Not quite arbitrary precision, but large enough for pretty all practical purposes "up to 131072 digits before the d
by anarazel 9y ago
You know there's a numeric type in postgres? Not quite arbitrary precision, but large enough for pretty all practical purposes "up to 131072 digits before the decimal point; up to 16383 digits after the decimal point"
https://www.postgresql.org/docs/current/static/datatype-numeric.html https://www.postgresql.org/docs/current/static/datatype-nume...
- tatersolid 9y agoNUMERIC (without a precision or scale) is a variable-length datatype, and suffers all the performance problems mentioned above. If you specify a precision and scale, performance of NUMERIC improves quite a bit, but now you can’t store values with vastly different magnitudes (USD and JPY) in the same column without wasting tons of storage on each row. You’re back to square one.