Re: About the MONEY type - Mailing list pgsql-general

From Thomas Kellerer
Subject Re: About the MONEY type
Date
Msg-id o1mf9e$bii$1@blaine.gmane.org
Whole thread Raw
In response to About the MONEY type  (Tobia Conforto <tobia.conforto@gruppo4.eu>)
Responses Re: About the MONEY type  (Raymond O'Donnell <rod@iol.ie>)
Re: About the MONEY type  (Tobia Conforto <tobia.conforto@gruppo4.eu>)
List pgsql-general
Tobia Conforto schrieb am 30.11.2016 um 12:15:
> I think MONEY is a great datatype, at least in theory.

I personally find it pretty useless to be honest - especially because the currency symbol depends on the client.

So if I store a money value in the database, some clients see CHF, some see Kč, some see £ and others might see € - all
seethe same amount. 
Which seems totally wrong because 10€ is something completely different then 10Kč or 10£.

Plus: inside a programming language (e.g. Java/JDBC) it's hard to work with the values because the database sends the
valuesas a string (it has to because of the currency symbol) but in reality it is a number - but you can't just convert
theString to a number again because of the symbol. 

So I always recommend to not use it (in Postgres just as well as in other DBMS, e.g. SQL Server)




pgsql-general by date:

Previous
From: Howard News
Date:
Subject: Verify Option with pg_dump
Next
From: Karsten Hilbert
Date:
Subject: Re: Verify Option with pg_dump