Re: dividing money by money
От | Chris Travers |
---|---|
Тема | Re: dividing money by money |
Дата | |
Msg-id | 5ed37b141003301207w722332c3kecba1fe278047c8f@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: dividing money by money ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>) |
Ответы |
Re: dividing money by money
|
Список | pgsql-bugs |
Forgot to send to the list.... On Tue, Mar 30, 2010 at 8:25 AM, Kevin Grittner <Kevin.Grittner@wicourts.gov> wrote: > John R Pierce <pierce@hogranch.com> wrote: >> Boszormenyi Zoltan wrote: > >>> But then any operator between two money values would >>> only work if both values have the same currency. > > That sounds like a sane limitation. > >> and, are there still any currenccies like old style UK where >> the subunits aren't 100ths? =A0 schillings or whatever > > I'm not sure if you're arguing for or against the database type > knowing how to divide those to get a percentage, versus putting the > onus on the application programmer. =A0Where does it make the most > sense to you to put such logic? With due respect, this sort of thing is rather difficult to get right all at once. =A0I would suggest at some point having a modified MONEY or maybe to avoid conflicts let's call it a CURRENCY datatype on Pg-foundry where we can experiment and get these details right. =A0I am thinking of doing a rough draft in SQL and PLPGSQL so that someone can convert to C once everything works properly :-). If folks are interested, I might make a simple approximation of this that would require 8.4 or higher. =A0It might come in handy for LedgerSMB too..... Best Wishes, Chris Travers
В списке pgsql-bugs по дате отправления: