Re: surrogate key or not?

From: Kenneth Gonsalves <lawgon(at)thenilgiris(dot)com>
To: Oliver Elphick <olly(at)lfix(dot)co(dot)uk>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: surrogate key or not?
Date: 2004-08-08 00:29:37
Message-ID: 0408080559370M.01190@thenilgiris.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Oliver Elphick 2004-08-08 01:06:36 Re: surrogate key or not?
Previous Message Knut P Lehre 2004-08-07 11:54:28 select