| From: | Martijn van Oosterhout <kleptog(at)svana(dot)org> |
|---|---|
| To: | "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com> |
| Cc: | mark(at)mark(dot)mielke(dot)cc, Thomas Hallgren <thomas(at)tada(dot)se>, Josh Berkus <josh(at)agliodbs(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, "A(dot)M(dot)" <agentm(at)themactionfaction(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: Fixed length datatypes. WAS [GENERAL] UUID's as |
| Date: | 2006-07-01 14:26:33 |
| Message-ID: | 20060701142633.GF24775@svana.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general pgsql-hackers |
On Fri, Jun 30, 2006 at 12:45:13PM -0500, Jim C. Nasby wrote:
> > If people agree to a generic 16-byte type, or a hex type with defined
> > fixed length with a set of standard functions and index operators that
> > it should work for, but nobody more qualified wants to make the patch
> > - I'll step up.
>
> I think it'd be extremely useful to have a means of defining
> fixed-length hex types, such as UUIDs and hashes (ie: SHA1). I usually
> only see people trying to do the same thing for CHAR in poorly-designed
> systems, but I suspect anyone dealing with legacy stuff might welcome
> that ability as well.
It would also be possible to provide two functions called hex_raw_in()
and hex_raw_out() that people could use like so:
CREATE TYPE uuid (
input = hex_raw_in,
output = hex_raw_out,
INTERNALLENGTH = 16
);
Where these input/output functions would work for any given length, so
the 16 could be replaced by any number, or even -1 to make a variable
length type...
Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2006-07-01 14:37:59 | Re: Fixed length datatypes. WAS [GENERAL] UUID's as |
| Previous Message | Martijn van Oosterhout | 2006-07-01 12:35:33 | Re: different sort order in windows and linux version |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2006-07-01 14:37:59 | Re: Fixed length datatypes. WAS [GENERAL] UUID's as |
| Previous Message | Martijn van Oosterhout | 2006-07-01 12:35:33 | Re: different sort order in windows and linux version |