circular REFERENCES

Поиск
Список
Период
Сортировка
От Gregory Seidman
Тема circular REFERENCES
Дата
Msg-id 20020618204446.GA21142@cs.brown.edu
обсуждение исходный текст
Ответы Re: circular REFERENCES  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Список 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 по дате отправления:

Предыдущее
От: Darren Ferguson
Дата:
Сообщение: Re: jobs.postgresql.org - Who's interested?
Следующее
От: Varun Kacholia
Дата:
Сообщение: Highly obscure and erratic