Re: Generating random unique alphanumeric IDs - Mailing list pgsql-general

From Daniel Verite
Subject Re: Generating random unique alphanumeric IDs
Date
Msg-id 36bae15f-7b98-4ead-8b5f-2c67f73137fc@mm
Whole thread Raw
In response to Re: Generating random unique alphanumeric IDs  (Thom Brown <thombrown@gmail.com>)
List pgsql-general
    Thom Brown wrote:

> If this results in an unpredictable and non-duplicating loop of generated
> sets of characters, that would be ideal.  Would a parallel for this be a
> 5-character code possibly transcoded from a 6-character GUID/UUID? (a-h +
> j+n + p-z + A-H + J-N + P+Z + 2-9 = 56 possible characters, 56^5 =
> 550,731,776,   550,731,776 / 16 (hex character set) ^ 6 (characters) = just
> over 32.), so wouldn't actually use up all possible combinations. :/

56^5 is the number of strings that you can form with 5 letters of the 56
letters alphabet. But independantly of that , what is the minimum number of
different values that you truly need?

Best regards,
--
Daniel
PostgreSQL-powered mail user agent and storage: http://www.manitou-mail.org

pgsql-general by date:

Previous
From: Sam Mason
Date:
Subject: Re: join from array or cursor
Next
From: John DeSoi
Date:
Subject: Re: join from array or cursor