From: Roberto Mello <rmello@cc.usu.edu>
To: Bernardo de Barros Franco <electric_csf@hotmail.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Using Random Sequence as Key
Date: Mon, 16 Apr 2001 10:31:49 -0600
Message-ID: <20010416103149.A17607@cc.usu.edu> (raw)
In-Reply-To: <9bdjag$faj$1@news.tht.net>
References: <9bdjag$faj$1@news.tht.net>
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.nethttp://www.sdl.usu.edu - Space Dynamics Lab, Developer
Oh my GOSH! A Prompt!!! HELP!!!! A PROMPT !!!!! HEEEEELP !!!!!!!!!!!!!
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: rmello@cc.usu.edu, electric_csf@hotmail.com
Subject: Re: Using Random Sequence as Key
In-Reply-To: <20010416103149.A17607@cc.usu.edu>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox