From: | Scott Marlowe <smarlowe(at)g2switchworks(dot)com> |
---|---|
To: | Aaron Steele <asteele(at)berkeley(dot)edu> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: inherit with foreign key reference |
Date: | 2005-05-06 21:21:24 |
Message-ID: | 1115414483.3868.106.camel@state.g2switchworks.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Fri, 2005-05-06 at 15:51, Aaron Steele wrote:
> 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"
> !----------------------------------------------------------!
Judging by the "pagesrc" error, it looks like you've edited the session
to remove any sensitive data, but in the doing may well have edited away
the evidence of the real problem.
What does the REAL session look like?
From | Date | Subject | |
---|---|---|---|
Next Message | Tony Caduto | 2005-05-06 22:18:06 | Re: Connecting to Postgres using Rekall |
Previous Message | elein | 2005-05-06 21:21:23 | Re: inherit with foreign key reference |