On 1/16/07, David Lee Lambert <[EMAIL PROTECTED]> wrote:
The problem with a random UUID generator is: where do you get the random numbers? However, there are really only two platforms to worry about: POSIX (use libuuid) and Win32 (there is probably a Win32 function to generate it, since MS SQL Server and the .NET API both provide GUID generation; but I can't seem to find it by searching the Web). Anyway, the uniqueidentifier project on GBorg seems like it has what you want: a user-defined type, and a generator. I think the main thing it needs is some code cleanup/robustness and a lot of production testing.
FYI... Apache Portable Runtime has a uuid generator, see apr-util package, function is apr_uuid_get(). Underlying it uses one of the following: a) uuid_create (FreeBSD via libc) b) uuid_generate (from libuuid) c) UuidCreate (for Win32) d) Apache version of a UUID generator -- Chad http://www.postgresqlforums.com/