Using PostgreSQL's money type instead of numeric

currency, database-schema, money-format, postgresql

Solution

Stick with Numeric:

It is faster from what I have heard

Output is consistent. What it means is consistent. Questions of whether to enforce rounding at storage or at retrieval (or in the application) are left to you. There are many cases where in fact you may want to store fractional cents and numeric lets you do this safely.

The other thing is that if you ever want to add multicurrency support, you will find numeric is far better at this than money is. This is because the currency symbol depends on your locale so you can insert $100, change your locale and have it show 100¥ which is not likely to be the same amount barring a massive economic shakeup.

I do financial accounting software. We made a decision to stick with numeric and we have been very happy with it.

Problem

I'm thinking of converting the `numeric` columns of my PG 9.2 database schema to `money`, mainly because of the benefits I see (or imagine?) in having rounding and formatting handled at the DB level, instead of the application level. Would there be some downsides to that decision?

Original source

Related problems