Foreign Key problem - Mailing list pgsql-novice

From David Mulcahy
Subject Foreign Key problem
Date
Msg-id 3B78070D.DCD0D282@mersinet.co.uk
Whole thread Raw
List 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 by date:

Previous
From: "Jason Wong"
Date:
Subject: Re: Arithmetic operation on DATE
Next
From: Noah Roberts
Date:
Subject: permission errors