pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: hubert depesz lubaczewski <depesz@depesz.com>
To: Campbell, Lance <lance@uiuc.edu>
Cc: Vivek Khera <vivek@khera.org>
Cc: pgsql-sql@postgresql.org
Subject: Re: Create on insert a unique random number
Date: Wed, 19 Mar 2008 10:59:41 +0100
Message-ID: <20080319095941.GB14712@depesz.com> (raw)
In-Reply-To: <B10E6810AC2A2F4EA7550D072CDE8760CDDC34@SAB-FENWICK.sab.uiuc.edu>
References: <B10E6810AC2A2F4EA7550D072CDE8760CDDC32@SAB-FENWICK.sab.uiuc.edu>
	<268179.51357.qm@web54301.mail.re2.yahoo.com>
	<20080318165138.GA6578@a-kretschmer.de>
	<B10E6810AC2A2F4EA7550D072CDE8760CDDC33@SAB-FENWICK.sab.uiuc.edu>
	<6649C6F5-BEDE-4A66-A9A3-33CE95633A83@khera.org>
	<B10E6810AC2A2F4EA7550D072CDE8760CDDC34@SAB-FENWICK.sab.uiuc.edu>

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)



view thread (19+ messages)  latest in thread

Message-ID: <20080319095941.GB14712@depesz.com>
Permalink:  ../20080319095941.GB14712@depesz.com/
Also on:    postgresql.org/message-id/20080319095941.GB14712@depesz.com

 · 

reply

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: depesz@depesz.com, lance@uiuc.edu, vivek@khera.org
  Subject: Re: Create on insert a unique random number
  In-Reply-To: <20080319095941.GB14712@depesz.com>

* 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