From: Tom Lane <tgl@sss.pgh.pa.us>
To: Curt Sampson <cjs@cynic.net>
Cc: Jules Alberts <jules.alberts@arbodienst-limburg.nl>
Cc: Postgres Admin List <pgsql-admin@postgresql.org>
Subject: Re: Fw: OID
Date: Mon, 19 Aug 2002 11:04:01 -0400
Message-ID: <7007.1029769441@sss.pgh.pa.us> (raw)
In-Reply-To: <Pine.NEB.4.44.0208192349320.432-100000@angelic.cynic.net>
References: <Pine.NEB.4.44.0208192349320.432-100000@angelic.cynic.net>
Curt Sampson <cjs@cynic.net> writes:
> On Mon, 19 Aug 2002, Jules Alberts wrote:
>> Is there any consensus aboit avoiding OIDs? I'm running a small test
>> system right now using OIDs as a means to refer to BLOBs. Should I
>> expect any trouble using OIDs in our future production system?
> I don't know if there's a consensus, but I certainly avoid using OIDs
> completely in my own tables. They're can wrap, for a start, so in a
> really busy, large database you might end up getting one that you
> already have. Also, I don't like "hidden" fields; if I'm going to refer
> to soemething, I like it to be nice and obvious what's being referred
> to. And of course they're not portable.
As far as using BLOBs goes, you don't have a lot of choice: the lo_xxx
family of functions take and return OID, end of story. Of course
Postgres' notion of a BLOB isn't very portable anyway.
I do agree that for a primary key in a user table, there's no very good
reason to use OIDs rather than using a SERIAL field (ie, a sequence).
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, cjs@cynic.net, jules.alberts@arbodienst-limburg.nl
Subject: Re: Fw: OID
In-Reply-To: <7007.1029769441@sss.pgh.pa.us>
References: <Pine.NEB.4.44.0208192349320.432-100000@angelic.cynic.net> <7007.1029769441@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox