Re: About the MONEY type

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: rod(at)iol(dot)ie
Cc: Thomas Kellerer <spam_eater(at)gmx(dot)net>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: About the MONEY type
Date: 2016-11-30 16:39:23
Message-ID: CAKFQuwa-+RGeAbZsi4BrUNUC6D2h7ygc2_k44eMapU0g1gbQZQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Nov 30, 2016 at 6:43 AM, Raymond O'Donnell <rod(at)iol(dot)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.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Merlin Moncure 2016-11-30 16:41:39 Re: About the MONEY type
Previous Message George 2016-11-30 15:56:11 Index is not used for "IN (non-correlated subquery)"