Re: inheritance problems

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Matt <matthew(dot)berardi(at)weilpublishing(dot)com>
Cc: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: inheritance problems
Date: 2002-06-14 20:03:17
Message-ID: 20020614130037.A18880-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Fri, 14 Jun 2002, Matt wrote:

> I have a parent with two columns, the primary key; several children
> inherit these columns.
>
> I can see all the childrens primary keys in the parent. however I can't
> reference data in the parent table that was entered into a child. I get
> a referential integrity violation. why is this? is there any way to
> change this behaviour. the purpose of haveing the parent was so that I
> could see the rows of two table in one place so that another table could
> indirectly reference the two of them. but this doesn't seem to behave
> the way it apears it should.

Inheritance has a bunch of problems currently including the fact that
primary keys, unique constraint, foreign keys and triggers don't inherit.
Foreign keys currently reference from only the table the constraint is on
to only the table the constraint names specifically (and none of the
children).

Depending on how flexible you are with changes to schema, there have been
some discussions of workarounds in the past.

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Rudi Starcevic 2002-06-17 06:17:58 template1 - recreate
Previous Message Jan Wieck 2002-06-14 19:27:48 Re: function not running after upgrade from 7.03 to 7.2