This is a discussion on Re: [HACKERS] Fixes for MONEY type using locale within the Pgsql Patches forums, part of the PostgreSQL category; --> Tom Lane wrote: > "Joshua D. Drake" <jd@commandprompt.com> writes: > > Well if we are going to continue to ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Tom Lane wrote: > "Joshua D. Drake" <jd@commandprompt.com> writes: > > Well if we are going to continue to support money (which I am against) > > we should support the casting to numeric as that is by far a more > > common implementation of money and we will have mixed environments. > > So, you don't use MONEY, and you don't want to, but nonetheless you > know better than the people who do use MONEY what they need. > > Aside from the semantic-gap issue, there is the point that providing > a cast might actually mask application errors. I can well imagine > cases where one of the reasons for using MONEY is *exactly* that it's > not a plain number or easily convertible to one. Right. I am not thinking of an auto-cast but rather give people _some_ way to cast to/from MONEY, which is what the TODO says: * Allow MONEY to be cast to/from other numeric data types Even when we have multiple currency designations I would think people would need a way to cast. I am trying to anticpate how MONEY will be used. You are right we don't have any field requests yet, but I am expecting them. I have added documentation on the issues of casting to/from MONEY; patch attached and applied. -- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB http://postgres.enterprisedb.com + If your life is a hard drive, Christ can be your backup. + ---------------------------(end of broadcast)--------------------------- TIP 5: don't forget to increase your free space map settings |