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

From David G. Johnston
Subject Re: About the MONEY type
Date
Msg-id CAKFQuwa-+RGeAbZsi4BrUNUC6D2h7ygc2_k44eMapU0g1gbQZQ@mail.gmail.com
Whole thread Raw
In response to Re: About the MONEY type  (Raymond O'Donnell <rod@iol.ie>)
List pgsql-general
On Wed, Nov 30, 2016 at 6:43 AM, Raymond O'Donnell <rod@iol.ie> wrote:

I seem to remember that it was actually deprecated at some point - this is going back quite a few years. This was later reversed, though I don't know why.


​Because its pointless to deprecate something that you haven't replaced and have no intention of just removing without a replacement.

I use money as a column type for a very specific reason:

I have data that comes to me in a money-like format (one which money can handle, though I'm in the U.S. so its limitations don't affect me as much) within a JSON body and I can use the "json_to_record"​
 
​to directly populate a target table without having either pre-process the value or store it as text and then perform post-processing.  Once I have it in as money ​a simple cast to numeric is reliable.

​Now, my GUI tool of choice chooses to simply return an empty string when faced with data in money format but working within psql is solid.​

David J.

pgsql-general by date:

Previous
From: George
Date:
Subject: Index is not used for "IN (non-correlated subquery)"
Next
From: Merlin Moncure
Date:
Subject: Re: About the MONEY type