4 ms·
Postgres developers disagree and recommend numeric. It was once deprecated and then un-deprecated. http://www.postgresql.org/message-id/b42b73150805270629h309f
by rpedela 12y ago
Postgres developers disagree and recommend numeric. It was once deprecated and then un-deprecated.
http://www.postgresql.org/message-id/b42b73150805270629h309f3704i72c259081d8d393d@mail.gmail.com http://www.postgresql.org/message-id/b42b73150805270629h309f...
- troyk 12y agoI don't know, I followed the thread and it didn't seem conclusive, esp with the main criticizer stating "OTOH, it's a neat example of a fixed precision integer type" I use it a lot, and yes, it is missing some casts but you can cast to decimal and go from there: select '42.00'::money::decimal; I've also used stripe, and maybe it's a javascript thing, but they represent all their money in cents. Personally, I'd rather use the money type, it is easy for me to reason about.
- sitharus 12y agoJavascript represents all numbers as IEEE 754 floating point. Base 2 floating point isn't good for representing base 10 decimals.