Looking for two datatypes... - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Looking for two datatypes...
Date
Msg-id 3965F31D.3D5C3664@cupid.suninternet.com
Whole thread Raw
List pgsql-general
For a system we're building here, it would be really nice
if we could find certain types that behave in certain
ways.

1. A currency type. Like money only not restricted to
dollars. Could store any currency available and format
it appropriately for output. Would fail if you tried
to add yen to dollars. Distinguish between australian
and american dollars. Actually, output not so important.

I guess you could emulate this with two separate fields
but enforcing rules would be not so easy.

2. A datetime type that would store the timezone as
well. All operations would be in the timezone the
datetime "is". Would have conversion functions
to switch to different timezones.

This could also be done with two fields. But it's
the automatic conversions that make it useful...

Do implementations of these types exist? If so, where?
If not, what would be the estimated complexity? They
don't *seem* too difficult...
--
Martijn van Oosterhout <kleptog@cupid.suninternet.com>
http://cupid.suninternet.com/~kleptog/

pgsql-general by date:

Previous
From: "Andrew Snow"
Date:
Subject: RE: proposed improvements to PostgreSQL license
Next
From: Dave Smith
Date:
Subject: Re: libpq connectivity