Re: char() or varchar() for frequently used column - Mailing list pgsql-novice

From Andrew McMillan
Subject Re: char() or varchar() for frequently used column
Date
Msg-id 1034852290.1153.375.camel@kant.mcmillan.net.nz
Whole thread Raw
In response to Re: char() or varchar() for frequently used column  ("Jules Alberts" <jules.alberts@arbodienst-limburg.nl>)
List 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 by date:

Previous
From: Tan ga
Date:
Subject: Trying to transform results of dow
Next
From: Andrew McMillan
Date:
Subject: Re: Trying to transform results of dow