Re: char() or varchar() for frequently used column

Поиск
Список
Период
Сортировка
От Andrew McMillan
Тема Re: char() or varchar() for frequently used column
Дата
Msg-id 1034852290.1153.375.camel@kant.mcmillan.net.nz
обсуждение исходный текст
Ответ на Re: char() or varchar() for frequently used column  ("Jules Alberts" <jules.alberts@arbodienst-limburg.nl>)
Список pgsql-novice
On Thu, 2002-10-17 at 22:23, Jules Alberts wrote:
>
> I have considered this. As a matter of fact, that is the way it is in
> our current db but I'm not really happy with it. Theoretically CODE
> should never change and is therefore safe to use as primary key. But
> having an "extra" serial primary key will make the db more flexible
> regarding to unforeseen complications.

Yeah, this happens.  Later people want to expire particular codes, or
change their meaning, but not for the existing records that refer to
them...

From my own experience, I would also say that there is value in being
able to sequence the codes in a non-alphabetic order.  I add another
"seq" column to such tables, to allow their ordering to be arbitrarily
adjusted as well.

Cheers,
                    Andrew.
--
---------------------------------------------------------------------
Andrew @ Catalyst .Net.NZ Ltd, PO Box 11-053, Manners St,  Wellington
WEB: http://catalyst.net.nz/         PHYS: Level 2, 150-154 Willis St
DDI: +64(4)916-7201     MOB: +64(21)635-694    OFFICE: +64(4)499-2267
           Survey for free with http://survey.net.nz/
---------------------------------------------------------------------


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

Предыдущее
От: Tan ga
Дата:
Сообщение: Trying to transform results of dow
Следующее
От: Andrew McMillan
Дата:
Сообщение: Re: Trying to transform results of dow