2 ms·
I wonder if a lot of relational database schemata intended to store monetary amounts can't handle amounts in the quadrillions. PostgreSQL can only go up to 922
by henning 18y ago
I wonder if a lot of relational database schemata intended to store monetary amounts can't handle amounts in the quadrillions.
PostgreSQL can only go up to 92233720368547758.07 (http://www.postgresql.org/docs/8.3/static/datatype-money.html http://www.postgresql.org/docs/8.3/static/datatype-money.htm...) -- 17 digits. Zimbabwe is pushing its limits.
SQL Server 2000's money datatype limit is a few orders of magnitude smaller (http://msdn.microsoft.com/en-us/library/aa933242 http://msdn.microsoft.com/en-us/library/aa933242(SQL.80).aspx), and so a 15 digit number can't be stored in it AFAIK.
- neilc 18y agoThe "money" type in Postgres is deprecated (e.g. see the locale-dependent restore issues that doc link mentions). "numeric" is an arbitrary precision data type that is probably a better choice for representing currency.