Re: surrogate key or not? - Mailing list pgsql-sql

From Kenneth Gonsalves
Subject Re: surrogate key or not?
Date
Msg-id 0408080559370M.01190@thenilgiris.com
Whole thread Raw
In response to Re: surrogate key or not?  (Oliver Elphick <olly@lfix.co.uk>)
Responses Re: surrogate key or not?  (Josh Berkus <josh@agliodbs.com>)
Re: surrogate key or not?  (sad <sad@bankir.ru>)
List pgsql-sql
On Sunday 08 August 2004 06:36 am, Oliver Elphick wrote:
> On Sat, 2004-08-07 at 05:00, Kenneth Gonsalves wrote:
> > why shouldnt the primary key change? the only key that should never
> > change is a key that is used as a foreign key in another table. In a
> > table like this:
> >
> > id serial unique
> > name varchar primary key
> >
> > name may change - id will never change. id is used as the foreign key
>
> It can change if you use ON UPDATE CASCADE in the foreign key
> definitions.

but why would anyone want to change the value of an autogenerated serial row?

-- 
regards
kg

http://www.onlineindianhotels.net - fastest hotel search website in the world
http://www.ootygolfclub.org


pgsql-sql by date:

Previous
From: Oliver Elphick
Date:
Subject: Re: surrogate key or not?
Next
From: Rod Taylor
Date:
Subject: Re: Make a column case insensitive