Skip site navigation (1) Skip section navigation (2)

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

From: Andrew McMillan <andrew(at)catalyst(dot)net(dot)nz>
To: jules(dot)alberts(at)arbodienst-limburg(dot)nl
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: char() or varchar() for frequently used column
Date: 2002-10-17 10:58:10
Message-ID: 1034852290.1153.375.camel@kant.mcmillan.net.nz (view raw or flat)
Thread:
Lists: 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/ 
---------------------------------------------------------------------


In response to

pgsql-novice by date

Next:From: Andrew McMillanDate: 2002-10-17 11:03:31
Subject: Re: Trying to transform results of dow
Previous:From: Tan gaDate: 2002-10-17 09:31:06
Subject: Trying to transform results of dow

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group