Received: from stan.ringways.co.uk ([213.38.87.130]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f6NBVUf99836 for ; Mon, 23 Jul 2001 07:31:30 -0400 (EDT) (envelope-from gary.stainburn@ringways.co.uk) Received: from gary.ringways.co.uk ([10.1.1.2]) by stan.ringways.co.uk with smtp (Exim 3.13 #1) id 15Odim-0005KC-00 for pgsql-sql@postgresql.org; Mon, 23 Jul 2001 12:17:56 +0100 Content-Type: text/plain; charset="iso-8859-1" From: Gary Stainburn Organization: Ringways Garages Ltd To: "pgsql-sql" Subject: Possible problems with cyclic references Date: Mon, 23 Jul 2001 12:30:21 +0100 X-Mailer: KMail [version 1.2] MIME-Version: 1.0 Message-Id: <01072312302101.27033@gary.ringways.co.uk> Content-Transfer-Encoding: 8bit X-Archive-Number: 200107/301 X-Sequence-Number: 4104 Hi all, me again. I've been looking at the doc's again (must stop doing that!) I've been looking at the 'references' clause to implement referential integrity. My problem is that I'm wanting to create a cyclic reference, and was wondering what problems this may cause, e.g. when restoring from a pg_dump. I have a region table (rregion character(2), rname varchar(40), rliasson int4). I have a teams table (ttid int4, tregion character(2) references region(rregion),...) I have a members table (mid int4, mteam references teams(tid),.........) Pretty straight forward so far, a member must be a part of a team and a team must be in a region. My problem is that I want to set rliasson as a reference to members (mid) as the Regional Liasson Officer for each region is a member. -- Gary Stainburn This email does not contain private or confidential material as it may be snooped on by interested government parties for unknown and undisclosed purposes - Regulation of Investigatory Powers Act, 2000