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
course.
Regards,
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/