X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 49AF1D1B53B for ; Fri, 25 Jun 2004 12:12:49 -0300 (ADT) 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 57125-03 for ; Fri, 25 Jun 2004 15:12:46 +0000 (GMT) Received: from web11.manitu.net (web11.manitu.net [217.11.48.111]) by svr1.postgresql.org (Postfix) with ESMTP id 4BF84D1B380 for ; Fri, 25 Jun 2004 12:12:45 -0300 (ADT) Received: from [192.168.0.1] (dsl-082-082-213-239.arcor-ip.net [82.82.213.239]) (authenticated) by web11.manitu.net (8.10.2-SOL3/8.10.2) with ESMTP id i5PFCda01494; Fri, 25 Jun 2004 17:12:39 +0200 Subject: Re: question about which column(s) are the right foreign key From: Markus Bertheau To: pgsql-sql@postgresql.org, Josh Berkus Content-Type: text/plain Message-Id: <1088176363.3189.15.camel@teetnang> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Fri, 25 Jun 2004 17:12:43 +0200 Content-Transfer-Encoding: 7bit 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: 200406/262 X-Sequence-Number: 18207 As a follow up, I now have object versions with the combined primary key (object id, date and time of object version creation). Now when I need to refer to an object version in a foreign key, do I let the object id column itself reference the objects table in addition to it being part of the foreign key to the object versions table? Thanks. -- Markus Bertheau