Re: How to generate unique hash-type id?

From: Ivan Sergio Borgonovo <mail(at)webthatworks(dot)it>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Re: How to generate unique hash-type id?
Date: 2010-01-29 12:52:19
Message-ID: 20100129135219.20664ce2@dawn.webthatworks.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, 29 Jan 2010 13:13:17 +0100
"Wappler, Robert" <rwappler(at)ophardt(dot)com> wrote:

> I'd suggest to use some kind of sequence or something constructed
> from the primary keys. But you may still see hash collisions
> although the input is different.

Concatenate /* ::text */ random() with something like:

http://www.webthatworks.it/d1/node/page/pseudo_random_sequences_postgresql

--
Ivan Sergio Borgonovo
http://www.webthatworks.it

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Craig Ringer 2010-01-29 13:24:11 Re: How to generate unique hash-type id?
Previous Message Alban Hertroys 2010-01-29 12:21:58 Re: Primary Key Increment Doesn't Seem Correct Under Table Partition