Re: [QUESTIONS] money or dollar type
От | Oliver Elphick |
---|---|
Тема | Re: [QUESTIONS] money or dollar type |
Дата | |
Msg-id | 199805111514.QAA23018@linda.lfix.co.uk обсуждение исходный текст |
Ответ на | money or dollar type ("Jose' Soares Da Silva" <sferac@bo.nettuno.it>) |
Ответы |
Re: [HACKERS] Re: [QUESTIONS] money or dollar type
Re: [QUESTIONS] money or dollar type |
Список | pgsql-hackers |
"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: 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. -- Oliver Elphick Oliver.Elphick@lfix.co.uk Isle of Wight http://www.lfix.co.uk/oliver PGP key from public servers; key ID 32B8FAA1 ======================================== "Search me, O God, and know my heart; try me, and know my thoughts. And see if there be any wicked way in me, and lead me in the way everlasting." Psalms 139:23,24
В списке pgsql-hackers по дате отправления: