On Mon, Dec 11, 2017 at 5:50 PM, Andres Freund <and...@anarazel.de> wrote: > This leads to fun like: > > postgres[2002][1]=# SELECT '92233720368547758.07'::money+'0.1'; > ┌─────────────────────────────┐ > │ ?column? │ > ├─────────────────────────────┤ > │ -$92,233,720,368,547,757.99 │ > └─────────────────────────────┘
It seems like I could have a lot MORE fun if I did it the other way -- i.e. spent myself so deeply into debt that I went positive again. Seriously, though, this same issue was noted in a discussion back in 2011: https://www.postgresql.org/message-id/flat/AANLkTi%3Dzbyy2%3Dcq8Wa3K3%2B%3Dn2ynkR1kdTHECnoruWS_G%40mail.gmail.com#AANLkTi=zbyy2=cq8Wa3K3+=n2ynkr1kdthecnoruw...@mail.gmail.com Long story short, I don't think anyone cares about this enough to spend effort fixing it. I suspect the money data type has very few users. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company