Re: Using varchar primary keys.

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: Using varchar primary keys.
Дата
Msg-id CAHyXU0w92QdgdK+zpwRTi+3oLrHvpRcsW1EQ_6rY84hXeE7WXA@mail.gmail.com
обсуждение исходный текст
Ответ на Using varchar primary keys.  (Tim Uckun <timuckun@gmail.com>)
Ответы Re: Using varchar primary keys.
Список pgsql-general
On Tue, Apr 2, 2013 at 2:01 PM, Samantha Atkins <sjatkins@me.com> wrote:
> Natural keys are in user data space.  Thus they are not guaranteed invariant and therefore cannot serve as persistent
identity.

That is true, but irrelevant in most real world cases.  Also, nothing
is keeping you from using an extra marker if/when you need to provide
an invariant lookup.

> Also natural keys have the considerable defect of being of different type and arity per logical entity type.   This
meansthat very nice things like dynamic relationships and persistent collections of references to multiple types of
thingscannot be built.  It also increases ORM  and data cache complexity. 

OO evangelism.

> These are considerable weaknesses.
>
> You cannot guess a uuid from say uuid.uuid4().  If you think you can I look forward to seeing your proof.

I never claimed that.  I said that postgresql random() can be guessed,
which it can, since it's based on lrand48.

merlin


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

Предыдущее
От: Gavin Flower
Дата:
Сообщение: Re: Money casting too liberal?
Следующее
От: Jerry Sievers
Дата:
Сообщение: Re: create temporary table problem