Re: New version of money type
От | Martijn van Oosterhout |
---|---|
Тема | Re: New version of money type |
Дата | |
Msg-id | 20060928205334.GD16473@svana.org обсуждение исходный текст |
Ответ на | Re: New version of money type ("Luke Lonergan" <llonergan@greenplum.com>) |
Ответы |
Re: New version of money type
|
Список | pgsql-hackers |
On Thu, Sep 28, 2006 at 01:29:57PM -0700, Luke Lonergan wrote: > Martijn, > > On 9/28/06 12:42 PM, "Martijn van Oosterhout" <kleptog@svana.org> wrote: > > > - Only supports one currency (dollars) > > What are the manifestations of this? test=# select '100'::money; money ---------$100.00 (1 row) The use of the dollar sign and the two decimal places make it wrong for the vast majority of the world's population. Now, there is some localization involved, so you can play tricks like: test=# set lc_monetary ='nl_NL'; SET test=# select '100'::money; money -----------EUR100,00 (1 row) Oops, by changing a GUC variable we just changed the semantic value of every currency field in the database. You still can't change the number of decimal places though. > > - Only supports one scale (yen has no decimal normally, but what if you > > want to track hundredths of a dollar-cent?) > > So, without a quantified benefit, this is certainly a non-starter. Every new type needs to have a well-defined use-case before it can be considered for includion. Currently we have: - Is possibly faster than numeric - Takes less space than numeric - Customisable output (only one currency at a time though) - Fixed number of decimal places What else? -- Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to litigate.
В списке pgsql-hackers по дате отправления: