Looking for two datatypes...

From: Martijn van Oosterhout <kleptog(at)cupid(dot)suninternet(dot)com>
To: pgsql-general(at)hub(dot)org
Subject: Looking for two datatypes...
Date: 2000-07-07 15:11:25
Message-ID: 3965F31D.3D5C3664@cupid.suninternet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)cupid(dot)suninternet(dot)com>
http://cupid.suninternet.com/~kleptog/

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2000-07-07 15:56:26 Re: Re: [SQL] Re: [GENERAL] lztext and compression ratios...
Previous Message Andrew Snow 2000-07-07 14:58:34 RE: proposed improvements to PostgreSQL license