Re: Generating random unique alphanumeric IDs

From: Sam Mason <sam(at)samason(dot)me(dot)uk>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Generating random unique alphanumeric IDs
Date: 2009-08-17 13:11:17
Message-ID: 20090817131117.GE5407@samason.me.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Aug 17, 2009 at 12:17:29PM +0000, Jasen Betts wrote:
> On 2009-08-17, Sam Mason <sam(at)samason(dot)me(dot)uk> wrote:
> (i.e. their internal state is the same as
> > it was before) but individual numbers *will* be repeated.
>
> numbers will not be repeated intil the state wraps if the number
> returned represents the entire state of the LFSR.

Huh, not thought of that! I'd only considered them for crypto purposes
where this sort of thing would be bad as you'd be able to know exactly
what's coming next. I'd never considered that this could be a useful
property before!

--
Sam http://samason.me.uk/

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Daniel Verite 2009-08-17 13:45:02 Re: comparing NEW and OLD (any good this way?)
Previous Message Jasen Betts 2009-08-17 12:17:29 Re: Generating random unique alphanumeric IDs