From: | hubert depesz lubaczewski <depesz(at)depesz(dot)com> |
---|---|
To: | "Campbell, Lance" <lance(at)uiuc(dot)edu> |
Cc: | Vivek Khera <vivek(at)khera(dot)org>, pgsql-sql(at)postgresql(dot)org |
Subject: | Re: Create on insert a unique random number |
Date: | 2008-03-19 09:59:41 |
Message-ID: | 20080319095941.GB14712@depesz.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
On Tue, Mar 18, 2008 at 01:40:42PM -0500, Campbell, Lance wrote:
> This is not a security approach. It is more about not giving obvious
> access to people that want to mess around.
1. keep primary key using standard serial. it will make your life a bit
simpler.
2. add column for text random identifiers (it doesn't have to be number,
and adding characters makes for much better "randomness").
3. check this:
http://www.depesz.com/index.php/2007/06/25/random-text-record-identifiers/
depesz
--
quicksil1er: "postgres is excellent, but like any DB it requires a
highly paid DBA. here's my CV!" :)
http://www.depesz.com/ - blog dla ciebie (i moje CV)
From | Date | Subject | |
---|---|---|---|
Next Message | D'Arcy J.M. Cain | 2008-03-19 13:47:53 | Re: Create on insert a unique random number |
Previous Message | Tom Lane | 2008-03-19 03:01:53 | Re: pg_dump using SQL |