Subject | Re: Guid Support in Firebird |
---|---|
Author | Ian A. Newby |
Post date | 2002-09-12T08:38:04Z |
Hi Sean,
Thanks for your response.
random and created. As far as I am aware windows platforms don't
have a good enough random number generator to use the random method.
I have read a document on UUID's (I think its a OSF document) which
describes the method Microsoft use (and I thought guids were a
microsoft thing!).
rdb$database" could return a guid. This would not require the
introduction of new reserved words.
I suppose if it was done properly in the engine the method could be
to store it as char(8) char set octets? but display it as 31
characters when returned via sql. I suppose you could use cast(guid
as char (26/31)) as an alternative. This would ease any index length
problems.
Regards
Ian Newby
Thanks for your response.
> Interestingly (depending on your point of view) _I thought_ Iheard that
> MS had changed there logic along the way, due to therelatively "static"
> nature of there GUID which they returned/created. So the 'format'of
> their GUID might change depending on the OS version.I have read that there are two main methods of guid generation,
random and created. As far as I am aware windows platforms don't
have a good enough random number generator to use the random method.
I have read a document on UUID's (I think its a OSF document) which
describes the method Microsoft use (and I thought guids were a
microsoft thing!).
> > Would it be possible to re-use the GEN_ID function with noCalling gen_id with no parameters such as "select gen_id from
> > parameters to generate a guid? is it desirable?
>
> Please elaborate on your proposed solution/idea.
rdb$database" could return a guid. This would not require the
introduction of new reserved words.
> The answer to this question depends on how you feel abouttranscribing a
> 26 or 31 char value by hand (without making a mistake). As far asthe
> system/indexing is concerned, the difference betweenis
> formatted/unformated is not worth thinking about. So, the answer
> really a personal choice. {My own vote would be for a formattedvalue}
I suppose if it was done properly in the engine the method could be
to store it as char(8) char set octets? but display it as 31
characters when returned via sql. I suppose you could use cast(guid
as char (26/31)) as an alternative. This would ease any index length
problems.
Regards
Ian Newby