Re: [sqlite] uuid generation in sqlite

2011-01-24 Thread Duquette, William H (318K)
On 1/24/11 8:36 AM, "Simon Slavin" wrote: > > On 24 Jan 2011, at 4:21pm, Duquette, William H (318K) wrote: > >> A question on using randomblob(16) to generate UUIDs, as the SQLite docs >> suggest: what assurance do you have that the UUID really is universally >> unique?

Re: [sqlite] uuid generation in sqlite

2011-01-24 Thread Duquette, William H (318K)
ome kind of magic in its seeding of the random number stream. Very cool, I was not aware of /dev/random. > > >> >> Will >> >> >> On 1/24/11 3:49 AM, "Alexey Pechnikov" <pechni...@mobigroup.ru> wrote: >> >> See >> http:/

Re: [sqlite] uuid generation in sqlite

2011-01-24 Thread Simon Slavin
On 24 Jan 2011, at 4:21pm, Duquette, William H (318K) wrote: > A question on using randomblob(16) to generate UUIDs, as the SQLite docs > suggest: what assurance do you have that the UUID really is universally > unique? It's a pseudo-random number, and you can replicate a stream of >

Re: [sqlite] uuid generation in sqlite

2011-01-24 Thread Richard Hipp
h-rd.org <sqlite-us...@h-rd.org> > > > Hi, > > > > I have put together a simple uuid generation method in sqlite: > > > > select '{' || hex( randomblob(4)) || '-' || hex( randomblob(2)) > > || '-' || '4' || substr( hex( randomblob(2)), 2) ||

Re: [sqlite] uuid generation in sqlite

2011-01-24 Thread Duquette, William H (318K)
have put together a simple uuid generation method in sqlite: > > select '{' || hex( randomblob(4)) || '-' || hex( randomblob(2)) > || '-' || '4' || substr( hex( randomblob(2)), 2) || '-' > || substr('AB89', 1 + (abs(random()) % 4) , 1) || > substr(hex

Re: [sqlite] uuid generation in sqlite

2011-01-24 Thread Alexey Pechnikov
See http://sqlite.mobigroup.ru/dir?name=ext/uuid 2011/1/24 sqlite-us...@h-rd.org <sqlite-us...@h-rd.org> > Hi, > > I have put together a simple uuid generation method in sqlite: > > select '{' || hex( randomblob(4)) || '-' || hex( randomblob(2)) > || '

Re: [sqlite] uuid generation in sqlite

2011-01-24 Thread Andy Gibbs
On Monday, January 24, 2011 11:11 AM, Artur Reilin wrote: >> Hi, >> >> I have put together a simple uuid generation method in sqlite: >> >> select '{' || hex( randomblob(4)) || '-' || hex( randomblob(2)) >> || '-' || '

Re: [sqlite] uuid generation in sqlite

2011-01-24 Thread Artur Reilin
> Hi, > > I have put together a simple uuid generation method in sqlite: > > select '{' || hex( randomblob(4)) || '-' || hex( randomblob(2)) > || '-' || '4' || substr( hex( randomblob(2)), 2) || '-' > || substr('AB89', 1 + (a

[sqlite] uuid generation in sqlite

2011-01-24 Thread sqlite-us...@h-rd.org
Hi, I have put together a simple uuid generation method in sqlite: select '{' || hex( randomblob(4)) || '-' || hex( randomblob(2)) || '-' || '4' || substr( hex( randomblob(2)), 2) || '-' || substr('AB89', 1 + (abs(random()) % 4) , 1) || substr(hex