Re: PostgreSQL Developer Best Practices

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: PostgreSQL Developer Best Practices
Дата
Msg-id CAKFQuwb99EjirBxFpgwOMi-3=tD95q99MuYvLVSm57e_0CJ0qw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: PostgreSQL Developer Best Practices  (Melvin Davidson <melvin6925@gmail.com>)
Список pgsql-general
On Tuesday, August 25, 2015, Melvin Davidson <melvin6925@gmail.com> wrote:
Before ANYONE continues to insist that a serial id column is good, consider the case where the number of tuples will exceed a bigint.
Don't say it cannot happen, because it can.
However, if you have an alphanumeric field, let's say varchar 50, and it's guaranteed that it will never have a duplicate, then THAT is a natural primary
key and beats the hell out of a generic "id" field.
 
Except for it being fatter.  400 bits wide instead of 64.  But that, too, is simply another consideration to evaluate.

David J.

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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: PostgreSQL Developer Best Practices
Следующее
От: Craig Ringer
Дата:
Сообщение: Re: BDR: cannot remove node from group