Re: primary key and existing unique fields

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: primary key and existing unique fields
Дата
Msg-id 417F5AB5.3010101@archonet.com
обсуждение исходный текст
Ответ на primary key and existing unique fields  ("Sally Sally" <dedeb17@hotmail.com>)
Список pgsql-general
Sally Sally wrote:
>  This
> existing unique field will have to be a character of fixed length
> (VARCHAR(12)) because although it's a numeric value there will be
> leading zeroes.

Plenty of people are contributing their tuppence-worth regarding the
choice of surrogate vs natural primary key.

Can I just point out that your existing unique field is EITHER a numeric
value OR it has a fixed number of characters - numbers don't have
leading zeros.

If what you have is a number, then perhaps consider int8/numeric types
and format appropriately when you display the values.

--
   Richard Huxton
   Archonet Ltd

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

Предыдущее
От: Thomas Hallgren
Дата:
Сообщение: Re: Theory
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: Bug or stupidity