Re: Money casting too liberal?

Поиск
Список
Период
Сортировка
От Julian
Тема Re: Money casting too liberal?
Дата
Msg-id 51582F1C.1020708@internode.on.net
обсуждение исходный текст
Ответ на Re: Money casting too liberal?  (Gavan Schneider <pg-gts@snkmail.com>)
Список pgsql-general
On 31/03/13 21:57, Gavan Schneider wrote:
> On 30/3/13 at 12:58 AM, D'Arcy J.M. Cain wrote:
> Basically if MONEY is to be a useful tool it should really handle money
> matters in a way that makes accountants happy. If it can't do that then
> nobody is going to bother using it for serious work since NUMERIC and
> INTEGER will do the job just as well without the surprises.
>
> Regards
> Gavan Schneider

Hi Gavan.
I most certainly do not store my GL values like that. I'm sure its all
about making the accountant "happy" but if he looked at any of my
accounting databases I've worked on he would just be "confused" (hes way
old school). He gets the "conventions" on printouts and a highlighter. :)

Anyhow, money could perhaps inspire a generic integer based data type
suitable for monetary values. A strict number literal for input and
output. e.g:

#SELECT '12.345'::decint2(3);

   decint2
------------
   12.345

For example something like decint8(6) could still handle trillions with
6 decimal places and exchange rates could fit well within a decint4(x).
I think that would be useful. Admittedly I'm just thinking on the fly
here, so will appreciated people correcting me or commenting.

Aside from that, it would appear that people are just happy with and
recommend numeric for the time being.

Just some thoughts. Regards.
Jules.


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

Предыдущее
От: Gavan Schneider
Дата:
Сообщение: Re: Money casting too liberal?
Следующее
От: CR Lender
Дата:
Сообщение: Re: pg_stat_get_last_vacuum_time(): why non-FULL?