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

Re: Money type not gone?

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: Andreas Pflug <pgadmin(at)pse-consulting(dot)de>
Cc: Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>,pgsql-bugs(at)postgresql(dot)org
Subject: Re: Money type not gone?
Date: 2004-09-21 17:42:49
Message-ID: 200409211042.49641.josh@agliodbs.com (view raw or flat)
Thread:
Lists: pgsql-bugs
Karel, Andreas,

> > My idea is special internal API that will usable for new datetypes
> > programming if type is defined as "numeric + symbol", for example things
> > like speed, weight, currency.. etc.
>
> A type consisting of value and unit probably makes pgsql even more first
> choice for technical applications. Please note that %, k, M and so on
> are scales, not units and thus dont belong into that type.

The difference with currency would be the lack of a fixed conversion for 
different units.    For example, you can:

10m == 1000cm
7l == 0.07m^3

But you can't reasonably:

10USD == 6.25UKL

... because that would require a query to money.yahoo.com to establish.  

-- 
Josh Berkus
Aglio Database Solutions
San Francisco

In response to

Responses

pgsql-bugs by date

Next:From: Andreas PflugDate: 2004-09-21 18:29:56
Subject: Re: Money type not gone?
Previous:From: Tom LaneDate: 2004-09-21 16:44:03
Subject: Re: sql function returning composite type

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