Re: PRIMARY KEY and INHERITANCE

From: "Oliver Elphick" <olly(at)lfix(dot)co(dot)uk>
To: Ferruccio Zamuner <nonsolosoft(at)diff(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: PRIMARY KEY and INHERITANCE
Date: 2000-12-31 19:13:35
Message-ID: 200012311913.eBVJDZH28080@linda.lfix.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Ferruccio Zamuner wrote:
>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?

Inheritance badly needs fixing (= I very much want it to work right!).

>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

This does work at 7.1

>How can I help you to fix this?
>

I had some suggestions for Inheritance semantics that no-one has yet
commented on (24th December "Re: [HACKERS] RI problem with inherited
table (fwd)").

If people agree with these, I would like to start research on how to
implement them.

--
Oliver Elphick Oliver(dot)Elphick(at)lfix(dot)co(dot)uk
Isle of Wight http://www.lfix.co.uk/oliver
PGP: 1024R/32B8FAA1: 97 EA 1D 47 72 3F 28 47 6B 7E 39 CC 56 E4 C1 47
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C
========================================
"Ye have heard that it hath been said, Thou shalt love
thy neighbour, and hate thine enemy. But I say unto
you, Love your enemies, bless them that curse you, do
good to them that hate you, and pray for them which
despitefully use you, and persecute you;"
Matthew 5:43,44

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew McMillan 2000-12-31 22:18:03 Re: Upper limit on number of buffers?
Previous Message Ferruccio Zamuner 2000-12-31 14:42:00 PRIMARY KEY and INHERITANCE