circular REFERENCES - Mailing list pgsql-general

From Gregory Seidman
Subject circular REFERENCES
Date
Msg-id 20020618204446.GA21142@cs.brown.edu
Whole thread Raw
Responses Re: circular REFERENCES  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
List pgsql-general
I would like to define two tables:

CREATE TABLE Person (
    id SERIAL not null,
    -- ...
    team_membership integer default null REFERENCES Team(id),
    primary key (id)
);
CREATE TABLE Person (
    id SERIAL not null,
    -- ...
    captain integer not null REFERENCES Person(id),
    primary key (uid)
);

Of course, I can't define them that way. Is there any better way to take
care of this than to leave out the REFERENCES in the first table and add it
with ALTER TABLE ADD CONTRAINT after the second table has been defined?

--Greg


pgsql-general by date:

Previous
From: Darren Ferguson
Date:
Subject: Re: jobs.postgresql.org - Who's interested?
Next
From: Varun Kacholia
Date:
Subject: Highly obscure and erratic