Re: [QUESTIONS] money or dollar type

From: "Oliver Elphick" <olly(at)lfix(dot)co(dot)uk>
To: "Jose' Soares Da Silva" <sferac(at)bo(dot)nettuno(dot)it>
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 14:14:44
Message-ID: 199805111514.QAA23018@linda.lfix.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"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:

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.
--
Oliver Elphick Oliver(dot)Elphick(at)lfix(dot)co(dot)uk
Isle of Wight http://www.lfix.co.uk/oliver
PGP key from public servers; key ID 32B8FAA1
========================================
"Search me, O God, and know my heart; try me, and know
my thoughts. And see if there be any wicked way in me,
and lead me in the way everlasting."
Psalms 139:23,24

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas G. Lockhart 1998-05-11 14:29:52 Re: [HACKERS] money or dollar type
Previous Message Gran Thyni 1998-05-11 14:08:58 Re: [HACKERS] mmap and MAP_ANON