Re: How useful is the money datatype?
От | Sam Mason |
---|---|
Тема | Re: How useful is the money datatype? |
Дата | |
Msg-id | 20091004161213.GN5407@samason.me.uk обсуждение исходный текст |
Ответ на | Re: How useful is the money datatype? ("V S P" <pgsql-general@postgresql.org>) |
Ответы |
Re: How useful is the money datatype?
Re: How useful is the money datatype? |
Список | pgsql-general |
On Sat, Oct 03, 2009 at 10:14:53PM -0400, V S P wrote: > Withing PG procedures at least in pgsql it is impossible to do 'money' > calculations without a loss of precision. The point is that on *any* computer it's impossible to perform arbitrary calculations to infinite precision (i.e. "without a loss of precision as you put it). You can do things losslessly in certain common situations and the numeric type in PG helps with a lot of these. > There is an open source library by IBM that I use in my C++ code to do > this, and may be it can be incorporated into PG > > it is called decNumber > http://speleotrove.com/decimal/decnumber.html How would this help over PG's existing numeric type? Support for decimal floating point numbers would be nice, but I'm pretty sure you're not asking for this. > Micropayment systems (that for example, I am implementing) require to > have a reasonably good precision. Support for currencies such as yen > also dictates that reasonably large numbers are supported Which limits do you find to be problematic in PG? -- Sam http://samason.me.uk/
В списке pgsql-general по дате отправления: