Received: from avocet.prod.itd.earthlink.net (avocet.mail.pas.earthlink.net [207.217.120.50]) by postgresql.org (8.11.3/8.11.4) with ESMTP id fBHGd6m74077 for ; Mon, 17 Dec 2001 11:39:09 -0500 (EST) (envelope-from metaperl@mac.com) Received: from pool0421.cvx7-bradley.dialup.earthlink.net ([209.178.165.166] helo=localhost) by avocet.prod.itd.earthlink.net with esmtp (Exim 3.33 #1) id 16G0me-0000jB-00; Mon, 17 Dec 2001 08:38:33 -0800 Date: Mon, 17 Dec 2001 02:41:09 -0800 Subject: Re: Numbering Rows (SEQUENCE, OID) questions Content-Type: text/plain; charset=ISO-8859-1; format=flowed Mime-Version: 1.0 (Apple Message framework v475) Cc: To: Stephan Szabo From: Terrence Brannon In-Reply-To: <20011216112020.D42764-100000@megazone23.bigpanda.com> Message-Id: <94F668C2-F2DA-11D5-92F7-003065C2A10C@mac.com> X-Mailer: Apple Mail (2.475) Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by postgresql.org id fBHGdcn74121 X-Archive-Number: 200112/180 X-Sequence-Number: 6004 On Sunday, December 16, 2001, at 11:42 AM, Stephan Szabo wrote: > On Sun, 16 Dec 2001, Terrence Brannon wrote: > >> The Momjian book is excellent (in spite of some of the bonehead >> reviews on amazon.com). I just finished the "Numbering Rows" >> section and have a few questions. None of these were in the FAQ, >> BTW. >> >> 1 - are OIDs ever re-used if rows are deleted? > > OIDs wraparound, but they don't just fill holes, so uniqueness > isn't guaranteed unless you have something like a unique index > on oid. Where do you get this information? If I am reading the Momjian book correctly, it disagrees with you: Every row in POSTGRESQL is assigned a unique, normally invisible number called an object identification number (OID). When the software is initialized with initdb , 12.1 a counter is created and set to approximately seventeen-thousand. 12.2 The counter is used to uniquely number every row. Although databases may be created and destroyed, the counter continues to increase. It is used by all databases, so identification numbers are always unique. No two rows in any table or in any database will ever have the same object ID.