Re: IS it a good practice to use SERIAL as Primary Key?

From: Scott Ribe <scott_ribe(at)killerbytes(dot)com>
To: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: IS it a good practice to use SERIAL as Primary Key?
Date: 2006-11-27 21:36:24
Message-ID: C190A868.5C2A5%scott_ribe@killerbytes.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> insert a new address, and update the users table to the new address_id

Which changes the user's "primary key". My point was that having the address
id be part of the primary key is wrong. Having it be a part of a key may be
fine for many uses. But it's contrary to the notion of primary key that
something that not only can, but will, change for many records should be
part of the primary key. "Unique" and "primary" are *not* synonyms.

--
Scott Ribe
scott_ribe(at)killerbytes(dot)com
http://www.killerbytes.com/
(303) 722-0567 voice

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ron Mayer 2006-11-27 21:39:31 Re: which version? old user coming back....
Previous Message Joshua D. Drake 2006-11-27 21:27:49 Re: IS it a good practice to use SERIAL as Primary Key?