From: | Alban Hertroys <alban(at)magproductions(dot)nl> |
---|---|
To: | Martijn van Oosterhout <kleptog(at)svana(dot)org> |
Cc: | Pailloncy Jean-Gerard <jg(at)rilk(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: Extended unit |
Date: | 2005-01-25 16:17:21 |
Message-ID: | 41F67111.1070805@magproductions.nl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Martijn van Oosterhout wrote:
> On Tue, Jan 25, 2005 at 10:40:15AM +0100, Pailloncy Jean-Gerard wrote:
>>This "extended type" was wonderful, because there was warning/error if
>>"extend type" does not match in any computation: you can not add apple
>>to orange.
>
>
> I think it's a wonderful idea. You could use a similar mechanism to
> implement:
>
> - Currencies (so you can't add dollars to pounds)
> - Timezone aware timestamps (so a time in Australia looks differet from
> a time in Europe)
>
> Probably much more.
Indeed, you could even add a way to convert between different types if
they are in the same categories; for example convert between dollars and
euro's or between degrees Celsius and degrees Fahrenheit (that's a
trickier one, the shell command 'units' returns wrong results there).
Of course, it's still not possible to add dollars and degrees
Fahrenheit... (hence the category concept I mentioned)
You could even determine that if you divide a quantity in meters by a
quantity in seconds that you're talking about a speed... I think there
are quite a few people on this planet who would be happy about that.
OTOH, it's probably not that a good idea to add all kinds of complicated
(read: "processor intensive") math to a database engine.
Just my 0.02 Euro.
--
Regards,
Alban Hertroys
MAG Productions
P: +31(0)53 4346874
F: +31(0)53 4346876
E: alban(at)magproductions(dot)nl
W: http://www.magproductions.nl
From | Date | Subject | |
---|---|---|---|
Next Message | Lonni J Friedman | 2005-01-25 16:19:53 | Re: PostgreSQL 8.0 for RH AS |
Previous Message | Thomas Chille (spoon) | 2005-01-25 16:16:19 | difficult JOIN |