Re: [HACKERS] GSoC 2017

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] GSoC 2017
Дата
Msg-id 13185.1485522505@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] GSoC 2017  (Greg Stark <stark@mit.edu>)
Ответы Re: [HACKERS] GSoC 2017  (Brad DeJong <Brad.Dejong@infor.com>)
Список pgsql-hackers
Greg Stark <stark@mit.edu> writes:
> 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.

There already is an extension somewhere for attaching units to numeric
values, which would be a place to start from for this purpose.  The
things I think are unique to the currency situation are:

* Time-varying conversion ratios.

* Conventional number of decimal places for any given currency.

* Idiosyncratic I/O formats (symbol to left or right of number,
odd rules for negatives, etc).  I think the space here is covered
by the POSIX currency locale rules.
        regards, tom lane



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

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