Re: question on serial key - Mailing list pgsql-general

From Brandon Metcalf
Subject Re: question on serial key
Date
Msg-id Pine.LNX.4.58L.0905221003190.17654@cedar.geronimoalloys.com
Whole thread Raw
In response to Re: question on serial key  (Sam Mason <sam@samason.me.uk>)
Responses Re: question on serial key  (Scott Marlowe <scott.marlowe@gmail.com>)
List pgsql-general
s == sam@samason.me.uk writes:

 s> On Fri, May 22, 2009 at 08:41:46AM -0500, Brandon Metcalf wrote:
 s> > I am looking for criteria on deciding whether or not to use a serial
 s> > (auto-incrementing) key for rows in a table.

 s> Wow, that's the second time today someone asked that!

 s> > Intuitively, it's pretty clear to me when a serial index is called
 s> > for.  Is there a succinct set of guidelines that one could go by?

 s> Not that I'm aware of; it's a fuzzy design choice with benefits and
 s> costs for either option.  There are lots of people who arbitrarily
 s> pick one side which tends to make things worse, using one or the other
 s> *exclusively* will add complication.  General terms to search for are
 s> Natural keys vs. Surrogate keys.

The search terms help.  I wasn't searching for the right thing and
finding very little information.

--
Brandon

pgsql-general by date:

Previous
From: Grzegorz Jaśkiewicz
Date:
Subject: Re: question on serial key
Next
From: Keith Hayden
Date:
Subject: How to update stavaluesN columns in pg_statistics (type anyarry)