Re: [HACKERS] GSoC 2017

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: [HACKERS] GSoC 2017
Дата
Msg-id CAM-w4HMiZ_MxrBkc3X7XPLSQTR_HdeuRJ=6DqnH8QJLarkvXcw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] GSoC 2017  (Peter van Hardenberg <pvh@pvh.ca>)
Ответы Re: [HACKERS] GSoC 2017  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: [HACKERS] GSoC 2017  (Thomas Kellerer <spam_eater@gmx.net>)
Список pgsql-hackers
On 24 January 2017 at 03:42, Peter van Hardenberg <pvh@pvh.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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: [HACKERS] pg_ls_dir & friends still have a hard-coded superusercheck
Следующее
От: Dave Page
Дата:
Сообщение: Re: [HACKERS] pg_ls_dir & friends still have a hard-coded superuser check