Skip site navigation (1) Skip section navigation (2)

Re: cast from integer to money

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Robert Haas" <robertmhaas(at)gmail(dot)com>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: cast from integer to money
Date: 2011-03-31 22:09:23
Message-ID: 4D94B543020000250003C090@gw.wicourts.gov (view raw, whole thread or download thread mbox)
Thread:
Lists: pgsql-hackers
Robert Haas <robertmhaas(at)gmail(dot)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

In response to

Responses

pgsql-hackers by date

Next:From: Merlin MoncureDate: 2011-03-31 22:33:02
Subject: Re: Process local hint bit cache
Previous:From: Bruce MomjianDate: 2011-03-31 21:59:15
Subject: Re: Bug in autovacuum.c?

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group