Unix Technical Forum

Re: [HACKERS] Fixes for MONEY type using locale

This is a discussion on Re: [HACKERS] Fixes for MONEY type using locale within the Pgsql Patches forums, part of the PostgreSQL category; --> Tom Lane wrote: > "Joshua D. Drake" <jd@commandprompt.com> writes: > > Well if we are going to continue to ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > Pgsql Patches

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-19-2008, 07:23 AM
Bruce Momjian
 
Posts: n/a
Default Re: [HACKERS] Fixes for MONEY type using locale

Tom Lane wrote:
> "Joshua D. Drake" <jd@commandprompt.com> writes:
> > Well if we are going to continue to support money (which I am against)
> > we should support the casting to numeric as that is by far a more
> > common implementation of money and we will have mixed environments.

>
> So, you don't use MONEY, and you don't want to, but nonetheless you
> know better than the people who do use MONEY what they need.
>
> Aside from the semantic-gap issue, there is the point that providing
> a cast might actually mask application errors. I can well imagine
> cases where one of the reasons for using MONEY is *exactly* that it's
> not a plain number or easily convertible to one.


Right. I am not thinking of an auto-cast but rather give people _some_
way to cast to/from MONEY, which is what the TODO says:

* Allow MONEY to be cast to/from other numeric data types

Even when we have multiple currency designations I would think people
would need a way to cast. I am trying to anticpate how MONEY will be
used. You are right we don't have any field requests yet, but I am
expecting them.

I have added documentation on the issues of casting to/from MONEY;
patch attached and applied.

--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://postgres.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +


---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 05:09 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com