From: | "Jose' Soares Da Silva" <sferac(at)bo(dot)nettuno(dot)it> |
---|---|
To: | Oliver Elphick <olly(at)lfix(dot)co(dot)uk> |
Cc: | questions postgres <pgsql-questions(at)postgreSQL(dot)org>, hackers postgres <pgsql-hackers(at)postgreSQL(dot)org> |
Subject: | Re: [QUESTIONS] money or dollar type |
Date: | 1998-05-11 17:38:33 |
Message-ID: | Pine.LNX.3.96.980511172715.866A-100000@proxy.bazzanese.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, 11 May 1998, Oliver Elphick wrote:
> "Jose' Soares Da Silva" wrote:
> >I think that PostgreSQL money type should be very useful if we could
> >remove the dollar sign. We can't use it with Lira/Peseta/Mark etc.
> >In europe now we have Euro. If we remove the $ it will be useful otherwise
> >we have to rename it to 'dollar'. ;-)
>
> Compile with LANG support and set the LANG environment variable for the
> postmaster. Restart the postmaster.
>
> Then you get your own currency symbol:
What's happening with EURO sign?
>
>
> junk=> select * from moneybag;
> who|amount
> ---+-------
> A |250.00
> (1 row)
>
>
> But I don't like the fact that this has to be done in the backend. It
> means that the currency of money is tied to the LANG environment of the
> postmaster, rather than to the data itself. One of the characteristics of
> money is the currency in which it is denominated; this ought to be part
> of the datatype. It would then be invalid to perform arithmetical
> operations between different currencies, which would correctly reflect
> the real world.
>
> Therefore, I propose that the money type be extended to include a
> currency definition, the default being that of the backend environment.
I agree, currently we can have only one currency definition. We can't
have for example Dollars and Pesetas in the same database.
Jose'
From | Date | Subject | |
---|---|---|---|
Next Message | David Gould | 1998-05-11 18:33:44 | Re: [HACKERS] Automatic type conversion |
Previous Message | Jose' Soares Da Silva | 1998-05-11 17:24:10 | Re: [HACKERS] money or dollar type |