PRIMARY KEY and INHERITANCE - Mailing list pgsql-hackers

From Ferruccio Zamuner
Subject PRIMARY KEY and INHERITANCE
Date
Msg-id 200012311442.eBVEfxC11641@tnt.diff.org
Whole thread Raw
Responses Re: PRIMARY KEY and INHERITANCE
Re: PRIMARY KEY and INHERITANCE
List pgsql-hackers
Hi,

some months ago I've asked for a suggestion for this bug:

create table a (      id serial primary key,      something text
);

create table b (      morething text
) inherits (a);

create table c (      trouble int references b;
);
NOTICE:  CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
ERROR:  PRIMARY KEY for referenced table "b" not found


How is possible to resolve this bug?
How is possible to talk about a ORDBMS with this kind of error?

I've looked for workaround, but:

create table d (      mytext text,      primary key (id)
) inherits (a);
ERROR:  CREATE TABLE: column 'id' named in key does not exist

How can I help you to fix this?


Best wishes,             \fer


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: [DOCS] Inheritance docs error.
Next
From: "Oliver Elphick"
Date:
Subject: Re: PRIMARY KEY and INHERITANCE