Re: Generating random unique alphanumeric IDs

From: Scott Ribe <scott_ribe(at)killerbytes(dot)com>
To: Thom Brown <thombrown(at)gmail(dot)com>, Sam Mason <sam(at)samason(dot)me(dot)uk>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Generating random unique alphanumeric IDs
Date: 2009-08-16 19:08:15
Message-ID: C6ADB53F.BF340%scott_ribe@killerbytes.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> I would have thought that duplications would become equally likely at the
> 16,777,216 mark.

Yes, at that point you're as likely to get a duplicate as a unique
one--every time you do it. You're likely to see your first duplicate long
before that point. In fact, it would be extremely unlikely to get to that
point without having generated any duplicates.

--
Scott Ribe
scott_ribe(at)killerbytes(dot)com
http://www.killerbytes.com/
(303) 722-0567 voice

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Dimitri Fontaine 2009-08-16 19:33:20 Re: bigint to ip
Previous Message Lew 2009-08-16 17:41:32 Re: Generating random unique alphanumeric IDs