From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | Simon Connah <simon(dot)n(dot)connah(at)protonmail(dot)com> |
Cc: | "pgsql-novice(at)lists(dot)postgresql(dot)org" <pgsql-novice(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Dealing with multiple currencies with the money type? |
Date: | 2021-04-18 15:21:41 |
Message-ID: | CAKFQuwZx8MvgnG=eXQgfLh0kuSqeUrMRVE5JLvDy3rVqb1A_xQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
On Sunday, April 18, 2021, Simon Connah <simon(dot)n(dot)connah(at)protonmail(dot)com>
wrote:
> Hi,
>
> I've read this page:
>
> https://www.postgresql.org/docs/13/datatype-money.html
>
> which seems to suggest that lc_monetary dictates what currency the
> database uses for the money type. But what if you want to have transactions
> in USD, GBP and EUR from a database with en_GB.UTF8 locale?
>
> Is this possible?
>
>
The money type should largely be avoided. I find it useful for parsing
external data but in the end store money using numeric. Add a currency
type field if you need to be explixit about what units the currency is in.
David J.
From | Date | Subject | |
---|---|---|---|
Next Message | Simon Connah | 2021-04-18 19:07:46 | Re: Dealing with multiple currencies with the money type? |
Previous Message | Simon Connah | 2021-04-18 12:08:41 | Dealing with multiple currencies with the money type? |