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

From Vincenzo Romano
Subject Re: (psuedo) random serial for PK or at least UNIQUE NOT NULL?
Date
Msg-id t2n3eff28921005050346j4ba439fcs37784de7bf2d90d8@mail.gmail.com
Whole thread Raw
In response to Re: (psuedo) random serial for PK or at least UNIQUE NOT NULL?  (Cédric Villemain <cedric.villemain.debian@gmail.com>)
Responses Re: (psuedo) random serial for PK or at least UNIQUE NOT NULL?  (Cédric Villemain <cedric.villemain.debian@gmail.com>)
List pgsql-general
>>>>>> 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?

> Better rewrite the function for 2^64 isn't it ?

Sure!.

--
Vincenzo Romano
NotOrAnd Information Technologies
NON QVIETIS MARIBVS NAVTA PERITVS

pgsql-general by date:

Previous
From: Cédric Villemain
Date:
Subject: Re: (psuedo) random serial for PK or at least UNIQUE NOT NULL?
Next
From: Cédric Villemain
Date:
Subject: Re: (psuedo) random serial for PK or at least UNIQUE NOT NULL?