Skip site navigation (1) Skip section navigation (2)

PRIMARY KEY and INHERITANCE

From: Ferruccio Zamuner <nonsolosoft(at)diff(dot)org>
To: pgsql-hackers(at)postgresql(dot)org
Subject: PRIMARY KEY and INHERITANCE
Date: 2000-12-31 14:42:00
Message-ID: 200012311442.eBVEfxC11641@tnt.diff.org (view raw or flat)
Thread:
Lists: 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

Responses

pgsql-hackers by date

Next:From: Oliver ElphickDate: 2000-12-31 19:13:35
Subject: Re: PRIMARY KEY and INHERITANCE
Previous:From: Patrick WelcheDate: 2000-12-31 14:18:19
Subject: Re: GNU readline and BSD license

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group