Re: Alternative to serial primary key

Поиск
Список
Период
Сортировка
От Scott Marlowe
Тема Re: Alternative to serial primary key
Дата
Msg-id 1152222693.13851.283.camel@state.g2switchworks.com
обсуждение исходный текст
Ответ на Re: Alternative to serial primary key  ("Sander Steffann" <s.steffann@computel.nl>)
Список pgsql-sql
On Thu, 2006-07-06 at 16:45, Sander Steffann wrote:
> Hi,
> 
> > But having a hash function over the address
> > column as the primary key means I can always regenerate my primary key
> 
> Warning: don't attach a meaning to a primary key, as it might change

And as long as it has cascading updates and deletes it doesn't matter if
it changes.  As long as it doesn't change into something that collides.

This is a religious topic, and there's advantages to both ways.  But if
the field is and always must be unique and non-null, then there's no
reason to not use it as a primary key.


В списке pgsql-sql по дате отправления:

Предыдущее
От: Scott Marlowe
Дата:
Сообщение: Re: Alternative to serial primary key
Следующее
От:
Дата:
Сообщение: Re: Alternative to serial primary key