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 15:20:31
Message-ID: 20090817152031.GG5407@samason.me.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Aug 17, 2009 at 04:00:54PM +0200, Harald Fuchs wrote:
> In article <20090816122526(dot)GW5407(at)samason(dot)me(dot)uk>,
> Sam Mason <sam(at)samason(dot)me(dot)uk> writes:
>
> > I've just had a look and PG does actually seem to be returning values as
> > I'd expect, i.e. 0 <= n < 1.
>
> That's what everyone would expect. If it's really implemented like
> that the documentation is wrong, isn't it?

Yup, the code is doing the right thing. I submitted a patch to the docs
and Tom committed a, somewhat more readable, version of it last night.

http://archives.postgresql.org/pgsql-committers/2009-08/msg00197.php

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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bryan Murphy 2009-08-17 15:23:58 ERROR: attempted to delete invisible tuple
Previous Message Sam Mason 2009-08-17 15:17:45 Re: comparing NEW and OLD (any good this way?)