X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 94B703A4077 for ; Mon, 8 Nov 2004 22:36:40 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 60133-09 for ; Mon, 8 Nov 2004 22:36:36 +0000 (GMT) Received: from post5.inre.asu.edu (post5.inre.asu.edu [129.219.110.120]) by svr1.postgresql.org (Postfix) with ESMTP id D4EB83A1EBF for ; Mon, 8 Nov 2004 22:36:38 +0000 (GMT) Received: from conversion.post5.inre.asu.edu by asu.edu (PMDF V6.1-1X6 #30769) id <0I6V00001TGR3N@asu.edu> for pgsql-admin@postgresql.org; Mon, 08 Nov 2004 15:36:27 -0700 (MST) Received: from smtp.asu.edu (smtp.asu.edu [129.219.110.107]) by asu.edu (PMDF V6.1-1X6 #30769) with ESMTP id <0I6V00MHDTGRIF@asu.edu> for pgsql-admin@postgresql.org; Mon, 08 Nov 2004 15:36:27 -0700 (MST) Received: from moroni.pp.asu.edu (moroni.pp.asu.edu [129.219.69.200]) by smtp.asu.edu (8.12.10/8.12.10/asu_smtp_relay, nullclient, tcp_wrapped) with ESMTP id iA8MaQMC009615 for ; Mon, 08 Nov 2004 15:36:26 -0700 (MST) Received: by moroni.pp.asu.edu (Postfix, from userid 500) id A81E5E8E; Mon, 08 Nov 2004 15:36:26 -0700 (MST) Date: Mon, 08 Nov 2004 15:36:26 -0700 From: David Bear Subject: using oids as primary keys and foreign keys To: pgsql-admin@postgresql.org Reply-To: David.Bear@asu.edu Message-id: <20041108223626.GA24870@asu.edu> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-disposition: inline User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200411/65 X-Sequence-Number: 15450 I've looked in the archives searching on oid and 'access' (microsoft) to see how others have handled migration from data bases in ms-access to postgresql. MS access has an auto-inc field that is used frequently as a uniq id. Seems the OID has the same function. Yet, I've seem parts of messages that say not to use the OID in that manner, but nothing seems 'definitive'. Can I use an OID as a foreign key in another table? If not, what is the prefered method for replicating the auto-inc field that ms-access users are so fond of... a 'sequence'? -- David Bear phone: 480-965-8257 fax: 480-965-9189 College of Public Programs/ASU Wilson Hall 232 Tempe, AZ 85287-0803 "Beware the IP portfolio, everyone will be suspect of trespassing"