Re: IS it a good practice to use SERIAL as Primary Key? - Mailing list pgsql-general

From Brandon Aiken
Subject Re: IS it a good practice to use SERIAL as Primary Key?
Date
Msg-id F8E84F0F56445B4CB39E019EF67DACBA3C4D1B@exchsrvr.winemantech.com
Whole thread Raw
In response to Re: IS it a good practice to use SERIAL as Primary Key?  (Scott Ribe <scott_ribe@killerbytes.com>)
List pgsql-general
Shenanigans!

That problem occurs regardless of whether or not you use surrogate keys.
You have exceeded the scope of the example.

--
Brandon Aiken
CS/IT Systems Engineer

-----Original Message-----
From: pgsql-general-owner@postgresql.org
[mailto:pgsql-general-owner@postgresql.org] On Behalf Of Scott Ribe
Sent: Monday, November 27, 2006 4:01 PM
To: Joshua D. Drake; pgsql-general@postgresql.org
Subject: Re: [GENERAL] IS it a good practice to use SERIAL as Primary
Key?

> You would update the address, the address id wouldn't change. If you
> want to keep track of old addresses you would keep an archive table
> associated with the user.id.

But what about historical data that referenced the address? If you move
today, I still want to know where I shipped last week's orders.


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



---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

pgsql-general by date:

Previous
From: Ron Mayer
Date:
Subject: Re: Unexpected sort order (suspected bug)
Next
From: Tony Caduto
Date:
Subject: Re: fatal error on 8.1 server