Re: Re: Format of the Money field
От | Dave Mertens |
---|---|
Тема | Re: Re: Format of the Money field |
Дата | |
Msg-id | 20010203191237.B7265@redbull.zyprexia.com обсуждение исходный текст |
Ответ на | Re: Format of the Money field ("Mitch Vincent" <mitch@venux.net>) |
Ответы |
Re: Re: Format of the Money field
|
Список | pgsql-hackers |
On Sat, Feb 03, 2001 at 11:39:29AM -0500, Mitch Vincent wrote: > What's the standard on Money type (if there is one) and if it doesn't > include the $ (of course that would change based on what currency you were > using) then is it any different than numeric(9,2)? numeric(9,2) is what I > use for all fields that need to hold a dollar amount so I'm curious.. I > remember reading in the documentation that money was numeric(9,2) with the > dollar sign added but I wanted to check with the man :-) Oh, never heard of currency?? NOT every country is using dollars. In a few months we in Europe are going to use the Euro. A money-type is normaly a floating type with a precision of 5 (float(5)). A money field is just like an float, only less precies. By the way, storing money values with an decimal precision is a (mostly) a bad thing. We Save currency amounts in the smallest unit. We save every amount in Eurocents. Our programs format the amount to the proper format (US-format (35,673.56) or EuropeannFormat (35.673,56). Currency signs are bad things in databases. Most database are international, so most amounts also! Sorry for this hard correction. Dave Mertens System Administrator ISM, Netherlands dmertens@ism.nl
В списке pgsql-hackers по дате отправления: