Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 9A38F475DCB for ; Mon, 19 Aug 2002 11:04:26 -0400 (EDT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id 06007475CEF for ; Mon, 19 Aug 2002 11:04:26 -0400 (EDT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.5/8.12.5) with ESMTP id g7JF41Vk007008; Mon, 19 Aug 2002 11:04:01 -0400 (EDT) To: Curt Sampson Cc: Jules Alberts , Postgres Admin List Subject: Re: Fw: OID In-reply-to: References: Comments: In-reply-to Curt Sampson message dated "Mon, 19 Aug 2002 23:51:20 +0900" Date: Mon, 19 Aug 2002 11:04:01 -0400 Message-ID: <7007.1029769441@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200208/209 X-Sequence-Number: 5324 Curt Sampson 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