Re: money type's overflow handling is woefully incomplete - Mailing list pgsql-hackers

From Robert Haas
Subject Re: money type's overflow handling is woefully incomplete
Date
Msg-id CA+TgmoZm1jgEV0hEtkaLx7Kj+uBOGKsT1gcX1id78Z6OwPahRQ@mail.gmail.com
Whole thread Raw
In response to money type's overflow handling is woefully incomplete  (Andres Freund <andres@anarazel.de>)
Responses Re: money type's overflow handling is woefully incomplete  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Mon, Dec 11, 2017 at 5:50 PM, Andres Freund <andres@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+=n2ynkR1kdTHECnoruWS_G@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

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: [HACKERS] Moving relation extension locks out of heavyweight lock manager
Next
From: Robert Haas
Date:
Subject: Re: Incorrect debug info printed in generate_partition_wise_join_paths