Re: surrogate key or not?

Поиск
Список
Период
Сортировка
От Kenneth Gonsalves
Тема Re: surrogate key or not?
Дата
Msg-id 0408080559370M.01190@thenilgiris.com
обсуждение исходный текст
Ответ на Re: surrogate key or not?  (Oliver Elphick <olly@lfix.co.uk>)
Ответы Re: surrogate key or not?  (Josh Berkus <josh@agliodbs.com>)
Re: surrogate key or not?  (sad <sad@bankir.ru>)
Список 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 по дате отправления:

Предыдущее
От: Oliver Elphick
Дата:
Сообщение: Re: surrogate key or not?
Следующее
От: Rod Taylor
Дата:
Сообщение: Re: Make a column case insensitive