Subject Re: [ib-support] Re: Guid Support in Firebird
Author Martijn Tonies
Hi,


> > 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.
>
> 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 no
> > > parameters to generate a guid? is it desirable?
> >
> > Please elaborate on your proposed solution/idea.
>
> Calling gen_id with no parameters such as "select gen_id from
> rdb$database" could return a guid. This would not require the

Pretty ugly in my opinion... gen_id is a function used for generators
only - let's keep it that way.

> introduction of new reserved words.

There's a difference (also in the engine) between "reserved" and
"key"words.

Besides, I don't really see a problem with creating a function
"create_guid" or something. That said, I would rather have it
return a value in a GUID datatype (if possible) and let the client
tools figure out how to display it ... This way, you could internally
optimize GUID to whatever and get a decent index for it ...


With regards,

Martijn Tonies
InterBase Workbench - the developer tool for InterBase
http://www.upscene.com

Firebird Workbench - the developer tool for Firebird
http://www.upscene.com

Upscene Productions
http://www.upscene.com

"This is an object-oriented system.
If we change anything, the users object."