From: | Roberto Mello <rmello(at)cc(dot)usu(dot)edu> |
---|---|
To: | Bernardo de Barros Franco <electric_csf(at)hotmail(dot)com> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: Using Random Sequence as Key |
Date: | 2001-04-16 16:31:49 |
Message-ID: | 20010416103149.A17607@cc.usu.edu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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 !!!!!!!!!!!!!
From | Date | Subject | |
---|---|---|---|
Next Message | cbell | 2001-04-16 17:48:03 | Re: Range of Serial values |
Previous Message | Poul L. Christiansen | 2001-04-16 16:06:44 | Re: Range of Serial values |