Re: Using Random Sequence as Key - Mailing list pgsql-sql

From Roberto Mello
Subject Re: Using Random Sequence as Key
Date
Msg-id 20010416103149.A17607@cc.usu.edu
Whole thread Raw
In response to Using Random Sequence as Key  ("Bernardo de Barros Franco" <electric_csf@hotmail.com>)
List pgsql-sql
On Sun, Apr 15, 2001 at 10:58:40PM -0300, Bernardo de Barros Franco wrote:

> I wanted to index a table by a random key. Exemplifying, when a insert is
> made, the id value is automatically filled with a random number between
> 10000 and 99999. I'm pretty new in pgsql so I could use a howto or
Bernardo,
Do you really need the keys to be random numbers? Can't the keys be
sequential numbers, like 1,2,3,4...? That'd be a lot easier to make
unique, and as far as the user is concerned, it'll be random for him/her.-Roberto
-- 
+----| http://fslc.usu.edu USU Free Software & GNU/Linux Club |------+ Roberto Mello - Computer Science, USU -
http://www.brasileiro.net      http://www.sdl.usu.edu - Space Dynamics Lab, Developer    
 
Oh my GOSH! A Prompt!!! HELP!!!! A PROMPT !!!!! HEEEEELP !!!!!!!!!!!!!


pgsql-sql by date:

Previous
From: "Albert REINER"
Date:
Subject: RULE ... TO table.column
Next
From: Justin Clift
Date:
Subject: Re: Range of Serial values