Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-general by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group