Re: Alternative to serial primary key

Поиск
Список
Период
Сортировка
От David Clarke
Тема Re: Alternative to serial primary key
Дата
Msg-id 12b7ac1e0607070037p4c2a94d4r8e6758be7b08ca95@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Alternative to serial primary key  ("D'Arcy J.M. Cain" <darcy@druid.net>)
Ответы Re: Alternative to serial primary key
Список pgsql-sql
On 7/7/06, D'Arcy J.M. Cain <darcy@druid.net> wrote:
> Are you sure?  I have a hard time imagining a situation where that
Absolutely.

> Also, you need to get into a lot more coding to handle the fact that
> "521 Main Avenue" is the same address as "521 Main Av." and "521 Main
> Ave" and even "521 Main."
Actually that is being done for me and you're correct, it is a lot of
effort but there are a variety of services out there and I'm not
trying to reinvent the wheel.

> And even given all of that, I would probably still use serial.
Because?

> Danger, Will Robinson.  The phrase "regenerate my primary key"
> immediately raises the hairs on the back of my neck.  If the primary
> key can ever change, you have a broken schema.

Perhaps my choice of words was somewhat hasty. A serial is totally
divorced from the data it represents whereas a md5 hash is (for my
purposes) unique, stable, verifiable, and simple.

Dave


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

Предыдущее
От: "Phillip Smith"
Дата:
Сообщение: Select Maths
Следующее
От: "David Clarke"
Дата:
Сообщение: Re: Alternative to serial primary key