Re: (psuedo) random serial for PK or at least UNIQUE NOT NULL? - Mailing list pgsql-general

From Cédric Villemain
Subject Re: (psuedo) random serial for PK or at least UNIQUE NOT NULL?
Date
Msg-id u2ue94e14cd1005050401k27cdd9f9l3a829f9f1738cbaf@mail.gmail.com
Whole thread Raw
In response to Re: (psuedo) random serial for PK or at least UNIQUE NOT NULL?  (Vincenzo Romano <vincenzo.romano@notorand.it>)
List pgsql-general
2010/5/5 Vincenzo Romano <vincenzo.romano@notorand.it>:
>>>>>>> http://wiki.postgresql.org/wiki/Pseudo_encrypt
>>> That's a nice starting point.
>>> I should apply that function twice for each 32-bit chunk of a
>>> 64-bit BIGINT and then merge the results into a single BIGINT ...
>>> Boring but doable!
>>
>> Hum, not sure. If I understand correctly, you won't be able to get the
>> original int64 from the generated one.
>
> Why should I bother?

Dunno, but it was in the original spec.

>
>> Better rewrite the function for 2^64 isn't it ?
>
> Sure!.
>
> --
> Vincenzo Romano
> NotOrAnd Information Technologies
> NON QVIETIS MARIBVS NAVTA PERITVS
>



--
Cédric Villemain

pgsql-general by date:

Previous
From: Vincenzo Romano
Date:
Subject: Re: (psuedo) random serial for PK or at least UNIQUE NOT NULL?
Next
From: Chris Barnes
Date:
Subject: Re: alter table alter type CASCADE