Skip site navigation (1) Skip section navigation (2)

Re: [SQL] Function for adding Money type

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Oliver Elphick <olly(at)lfix(dot)co(dot)uk>
Cc: pgsql-hackers(at)postgresql(dot)org, josh(at)agliodbs(dot)com,ddurst(at)larubber(dot)com, pgsql-sql(at)postgresql(dot)org
Subject: Re: [SQL] Function for adding Money type
Date: 2003-01-27 20:14:57
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackerspgsql-sql
Oliver Elphick wrote:
> On Sun, 2003-01-26 at 13:53, D'Arcy J.M. Cain wrote:
> > This year, my team is planning on improving the MONEY type.  Of course, we can 
> > always make it a user defined type if PostgreSQL doesn't want it.  We will at 
> > least put it into contrib.  However, if people think that it is useful and 
> > want to leave it in the main tree that's good too.  What we want to do is a) 
> > switch to a 64 bit integer from a 32 bit integer in order to hold amounts of 
> > any reasonabe size and b) allow it to be cast to and from more types.  
> > Perhaps we can also add the ability to specify the number of decimal places 
> > on output but I am not sure if that would affect the primary benefit of using 
> > it, speed.
> A money type needs to specify what currency is held.  The current one
> changes the currency with the locale, which makes nonsense of existing
> data.

Agreed.  We can default to locale but need a way of overriding that,
ideally with atttypmod at the column level.  I assume this will be done
for 7.4 (you said "this year")?

  Bruce Momjian                        |
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

In response to

pgsql-hackers by date

Next:From: Bruce MomjianDate: 2003-01-27 20:26:27
Subject: Re: WAL replay logic (was Re: [PERFORM] Mount options for Ext3?)
Previous:From: Bruce MomjianDate: 2003-01-27 20:11:18
Subject: Re: Mount options for Ext3?

pgsql-sql by date

Next:From: Rod KreislerDate: 2003-01-27 20:17:38
Subject: Re: sequence question
Previous:From: Luke PascoeDate: 2003-01-27 20:11:21
Subject: Re: CAST from VARCHAR to INT

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group