Foreign Key problem

Поиск
Список
Период
Сортировка
От David Mulcahy
Тема Foreign Key problem
Дата
Msg-id 3B78070D.DCD0D282@mersinet.co.uk
обсуждение исходный текст
Список pgsql-novice
I am having problems trying to create the following.  Any suggestions
would be greatly appreciated.

CREATE TABLE "t0" (
    "id" integer,
    "table" character(1),
    "product" character(1),
    Primary Key ("id", "table")
);

CREATE TABLE "t1" (
    "id" integer,
    "table" character(1),
    "product" text,
    Primary Key ("id", "table")
);
CREATE TABLE "t3" (
    "num" integer,
    "id" integer REFERENCES t0 and t1,
    "table" character(1) REFERENCES t0 and t1,
    Primary Key ("num", "id", "table")
);

Is it possible to have a foreign key reference two tables like in the
above example if so how would I do it. I am using postgresql v 7.1.2.

Thanks in advance
David Mulcahy

В списке pgsql-novice по дате отправления:

Предыдущее
От: "Jason Wong"
Дата:
Сообщение: Re: Arithmetic operation on DATE
Следующее
От: Noah Roberts
Дата:
Сообщение: permission errors