pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Gary Stainburn <gary.stainburn@ringways.co.uk>
To: pgsql-sql <pgsql-sql@postgresql.org>
Subject: Possible problems with cyclic references
Date: Mon, 23 Jul 2001 12:30:21 +0100
Message-ID: <01072312302101.27033@gary.ringways.co.uk> (raw)

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     



view thread (3+ messages)  latest in thread

Message-ID: <01072312302101.27033@gary.ringways.co.uk>
Permalink:  ../01072312302101.27033@gary.ringways.co.uk/
Also on:    postgresql.org/message-id/01072312302101.27033@gary.ringways.co.uk

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: gary.stainburn@ringways.co.uk
  Subject: Re: Possible problems with cyclic references
  In-Reply-To: <01072312302101.27033@gary.ringways.co.uk>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox