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

Re: db design question

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: db design question
Date: 2002-10-21 18:48:29
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
On Thu, 2002-10-17 at 19:11, Jules Alberts wrote:
> Both OIDs and sequences exist and should do the job, but the question 
> is, which one is more reliable? Which one will keep it's current 
> syntax, functionality etc. longest? The db I'm designing will be the 
> core of my companies IT and will be in use for at least 5 years (the 
> current one is into its 7th) and a lot can change in that time. That's 
> why these decisions are so important now, on what horse do I put my 
> money?
Don't put your money on OID.  These have changed in the past, are known
to change between dump/reload and offer no advantages.

In some databases the equivalent of the OID can provide fast access to a
record, but this is not the case in PostgreSQL where you will still need
to take normal measures (i.e. index on that column), just as you would a
SERIAL column, which would be invariant between dump/restore.

In more recent PostgreSQL versions you can create tables without OIDs,
so there is no longer even space savings involved.

For the large-object interface you are stuck with OID for now, of

Andrew @ Catalyst .Net.NZ Ltd, PO Box 11-053, Manners St,  Wellington
WEB:         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 

pgsql-novice by date

Next:From: working4alivingDate: 2002-10-22 00:36:01
Subject: Re: Big Picture
Previous:From: Devinder K RajputDate: 2002-10-21 16:45:09
Subject: if statement

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