From: | Greg Stark <stark(at)mit(dot)edu> |
---|---|
To: | Peter van Hardenberg <pvh(at)pvh(dot)ca> |
Cc: | Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Thom Brown <thom(at)linux(dot)com>, Josh Berkus <josh(at)agliodbs(dot)com> |
Subject: | Re: GSoC 2017 |
Date: | 2017-01-27 12:47:58 |
Message-ID: | CAM-w4HMiZ_MxrBkc3X7XPLSQTR_HdeuRJ=6DqnH8QJLarkvXcw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 24 January 2017 at 03:42, Peter van Hardenberg <pvh(at)pvh(dot)ca> wrote:
> The basic concept is that the value of a currency type is that it would
> allow you to operate in multiple currencies without accidentally adding
> them. You'd flatten them to a single type if when and how you wanted for any
> given operation but could work without fear of losing information.
I don't think this even needs to be tied to currencies. I've often
thought this would be generally useful for any value with units. This
would prevent you from accidentally adding miles to kilometers or
hours to parsecs which is just as valid as preventing you from adding
CAD to USD.
Then you could imagine having a few entirely optional helper functions
that could automatically provide conversion factors using units.dat or
currency exchange rates. But even if you don't use these helper
functions they would still be useful.
--
greg
From | Date | Subject | |
---|---|---|---|
Next Message | Dave Page | 2017-01-27 12:56:10 | Re: pg_ls_dir & friends still have a hard-coded superuser check |
Previous Message | Alvaro Herrera | 2017-01-27 12:34:03 | Re: pg_ls_dir & friends still have a hard-coded superuser check |