Re: cast from integer to money - Mailing list pgsql-hackers

From Kevin Grittner
Subject Re: cast from integer to money
Date
Msg-id 4D94B543020000250003C090@gw.wicourts.gov
Whole thread Raw
In response to Re: cast from integer to money  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: cast from integer to money
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> wrote:
>> There were reasonable arguments made why this could be a bad idea
>> -- primarily around the question of whether '395' represented
>> $3.95 or $395.00.
> 
> That's not too hard to figure out, right?  If 1.00 means $1.00, 1
> had better not mean $0.01, or there will be riots in the streets.
> 
>> Going the other way has issues with truncation of
>> fractions and the number of digits which can be handled.
> 
> Notice I didn't propose that.
If you're just talking about going in the one direction, I might be
persuaded that's sane, especially because of the case of literals,
and especially since there are currencies where fractional amounts
aren't used in the conventional representation.
-Kevin


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Bug in autovacuum.c?
Next
From: Merlin Moncure
Date:
Subject: Re: Process local hint bit cache