Re: UUID/GUID discussion leading to request for hexstring bytea? (was: Re: TODO: GUID datatype)

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: mark(at)mark(dot)mielke(dot)cc
Cc: Gevik Babakhani <pgdev(at)xs4all(dot)nl>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: UUID/GUID discussion leading to request for hexstring bytea? (was: Re: TODO: GUID datatype)
Date: 2006-09-07 09:35:05
Message-ID: 20060907093505.GB10093@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Sep 06, 2006 at 05:05:47PM -0400, mark(at)mark(dot)mielke(dot)cc wrote:
> 2) Create semi-generic types with common bitlengths. Associated
> functions work on these semi-generic types. No overhead.
> - hexstring128, hexstring160, ...
>
> 3) Create a new bytea type that has ascii input and output formats,
> probably based around hexstrings. Overhead of 4 bytes.

I think 3) is worthwhile for core, it would have many uses. But you
don't actually need to have a new type for that, just new I/O
functions.

As for 2) I think would be acceptable for contrib to contain some code
that demonstrates how to make fixed length types. It would be fairly
straightforward to make a script where you give it a type name and a
length and it'll spit out the code for that type.

I don't think UUID specific stuff needs to be in core, though you could
make an argument that the hex input/output functions should ignore
dashes, to make it straightforward to store UUIDs directly in there.

Hope this helps,
--
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.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nimesh Satam 2006-09-07 10:31:34 Template0 age is increasing speedily.
Previous Message Gregory Stark 2006-09-07 09:07:48 Re: Win32 hard crash problem