3 ms·
I 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
by troyk 12y ago
I 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.