Re: [QUESTIONS] money or dollar type
От | Jose' Soares Da Silva |
---|---|
Тема | Re: [QUESTIONS] money or dollar type |
Дата | |
Msg-id | Pine.LNX.3.96.980511172715.866A-100000@proxy.bazzanese.com обсуждение исходный текст |
Ответ на | Re: [QUESTIONS] money or dollar type ("Oliver Elphick" <olly@lfix.co.uk>) |
Ответы |
Re: [QUESTIONS] money or dollar type
|
Список | pgsql-hackers |
On Mon, 11 May 1998, Oliver Elphick wrote: > "Jose' Soares Da Silva" wrote: > >I think that PostgreSQL money type should be very useful if we could > >remove the dollar sign. We can't use it with Lira/Peseta/Mark etc. > >In europe now we have Euro. If we remove the $ it will be useful otherwise > >we have to rename it to 'dollar'. ;-) > > Compile with LANG support and set the LANG environment variable for the > postmaster. Restart the postmaster. > > Then you get your own currency symbol: What's happening with EURO sign? > > > junk=> select * from moneybag; > who|amount > ---+------- > A |�250.00 > (1 row) > > > But I don't like the fact that this has to be done in the backend. It > means that the currency of money is tied to the LANG environment of the > postmaster, rather than to the data itself. One of the characteristics of > money is the currency in which it is denominated; this ought to be part > of the datatype. It would then be invalid to perform arithmetical > operations between different currencies, which would correctly reflect > the real world. > > Therefore, I propose that the money type be extended to include a > currency definition, the default being that of the backend environment. I agree, currently we can have only one currency definition. We can't have for example Dollars and Pesetas in the same database. Jose'
В списке pgsql-hackers по дате отправления: