Received: from druid.net (root@druid.net [216.126.72.98]) by hub.org (8.10.1/8.10.1) with ESMTP id e6LDwLh03080 for ; Fri, 21 Jul 2000 09:58:21 -0400 (EDT) Received: from localhost (1495 bytes) by druid.net via sendmail with P:stdio/R:bind_hosts/T:inet_zone_bind_smtp (sender: ) (ident using unix) id for ; Fri, 21 Jul 2000 09:58:15 -0400 (EDT) (Smail-3.2.0.109 1999-Oct-27 #3 built 2000-Jun-28) Message-Id: From: darcy@druid.net (D'Arcy J.M. Cain) Subject: Re: using OID as primary key In-Reply-To: <200007211157.NAA04499@hot.jw.home> "from Jan Wieck at Jul 21, 2000 01:57:17 pm" To: Jan Wieck Date: Fri, 21 Jul 2000 09:58:15 -0400 (EDT) CC: wagner@imsd.uni-mainz.de, pgsql-sql Reply-To: pgsql-sql@postgresql.org X-Mailer: ELM [version 2.4ME+ PL78 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Archive-Number: 200007/204 Thus spake Jan Wieck > > are there any disadvantages of using OID as the primary key for any > > table? > > What about referencing external tuples using their OIDs? > > Currently OID is not supported for references. Has to do with > some checks done in the RI triggers, using SPI functions. > We're thinking about a solution... Also, don't forget about the dump/restore issue. You have to remember to dump OIDs with "-o" or else all your references will be trashed. Personally I would avoid it. Adding a serial type almost gives you the same thing anyway. OIDs are useful in system tables and temporarily in programs when dealing with tables without primary keys. -- D'Arcy J.M. Cain | Democracy is three wolves http://www.druid.net/darcy/ | and a sheep voting on +1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner.