Subject | RE: [ib-support] Guid Support in Firebird |
---|---|
Author | Leyne, Sean |
Post date | 2002-09-11T22:25:24Z |
> I have been looking into guid support and noted a number of things:Yep -- it's one my own personal requests.
>
> 1. There is outstanding feature request for this.
> 2. Normal guids (generated using mac address etc) are not optimisedI think that this is really platform/OS dependent.
> for firebird indexes, they need to be reordered.
Interestingly (depending on your point of view) _I thought_ I heard that
MS had changed there logic along the way, due to the relatively "static"
nature of there GUID which they returned/created. So the 'format' of
their GUID might change depending on the OS version.
> 3. A number of third party UDF's exist to create guids for windows.Quite correct, unfortunately, adding new system functions has been
> I have been unable to find one for linux.
> 4. Linux has a library to create guids, libuuid. It is part of the
> e2fsprogs package.
>
> To implement guid support cross platform either a udf is required
> which does different things on different platforms or the engine
> needs to be extended to do the same.
targeted towards a v2.0 release (there have been some exceptions), and
not the next v1.5 release.
> Would it be possible to re-use the GEN_ID function with noPlease elaborate on your proposed solution/idea.
> parameters to generate a guid? is it desirable?
> How should a guid be stored in the database, should a newGiven that a GUID is a 128bit integer (Large Large Integer ???) storing
> datatype be created?
it as a numeric values won't fly (until a new base datatype is created
-- which requires a ODS change, which requires...).
So, you're left with storing the value as a CHAR, the only question is
whether you want to store a formated value "xxxx-xxx-xxx-xxx..." or
unformated "xxxxxxxxxxxxxx..."?
The answer to this question depends on how you feel about transcribing a
26 or 31 char value by hand (without making a mistake). As far as the
system/indexing is concerned, the difference between
formatted/unformated is not worth thinking about. So, the answer is
really a personal choice. {My own vote would be for a formatted value}
Sean