From: | Aaron Steele <asteele(at)berkeley(dot)edu> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | inherit with foreign key reference |
Date: | 2005-05-06 20:51:45 |
Message-ID: | 427BD8E1.3080205@berkeley.edu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
dear readers,
i've created a simple Fooey table that inherits from Foo:
!----------------------------------------------------------!
CREATE TABLE Foo(
fooid serial UNIQUE,
footype text);
CREATE TABLE Fooey(
data text);
INHERITS(Foo);
!----------------------------------------------------------!
next i try to create a Bar table that references Fooey's fooid (inherited from Foo) as a foreign key:
!----------------------------------------------------------!
CREATE TABLE Bar(
fooeyid int REFERENCES Fooey(fooid));
!----------------------------------------------------------!
unfortunately i get the following error:
!----------------------------------------------------------!
ERROR: there is no unique constraint matching given keys for referenced table "pagesrc"
!----------------------------------------------------------!
thoughts?
thanks,
aaron
From | Date | Subject | |
---|---|---|---|
Next Message | Paul Thomas | 2005-05-06 20:52:48 | Re: Question about running "Vacuum" through JDBC |
Previous Message | Michael Meskes | 2005-05-06 20:49:49 | Re: ECPG - Timestamp to ascii Conversion PG version 7.4 |