database schema - Using PostgreSQL's money type instead of numeric -
i'm thinking of converting numeric
columns of pg 9.2 database schema money
, because of benefits see (or imagine?) in having rounding , formatting handled @ db level, instead of application level. there downsides decision?
stick numeric:
it faster have heard
output consistent. means consistent. questions of whether enforce rounding @ storage or @ retrieval (or in application) left you. there many cases in fact may want store fractional cents , numeric lets safely.
the other thing if ever want add multicurrency support, find numeric far better @ money is. because currency symbol depends on locale can insert $100, change locale , have show 100¥ not same amount barring massive economic shakeup.
i financial accounting software. made decision stick numeric , have been happy it.
Comments
Post a Comment