Re: (psuedo) random serial for PK or at least UNIQUE NOT NULL?

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Vincenzo Romano <vincenzo(dot)romano(at)notorand(dot)it>
Cc: PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Re: (psuedo) random serial for PK or at least UNIQUE NOT NULL?
Date: 2010-05-04 17:48:25
Message-ID: 20100504174825.GB3565@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Vincenzo Romano wrote:
> Hi all.
>
> I'm willing to change an BIGINT ID column (actually a SERIAL8) with a
> BIGINT whose valules are (pseudo)random.
> The main objective is to avoid guessability.
> I whish I could also use it as the PK (as it's now) but that's not
> really important now.
> Any hint?

http://wiki.postgresql.org/wiki/Pseudo_encrypt

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message sunpeng 2010-05-04 19:18:08 why there are two TargetEntrys in Query when i use "select count(catcode) from pois group by catcode"?
Previous Message Sergey E. Koposov 2010-05-04 16:38:20 Re: PG & random() strangeness