pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephan Szabo <sszabo@megazone23.bigpanda.com>
To: Matt <matthew.berardi@weilpublishing.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: inheritance problems
Date: Fri, 14 Jun 2002 13:03:17 -0700 (PDT)
Message-ID: <20020614130037.A18880-100000@megazone23.bigpanda.com> (raw)
In-Reply-To: <3D0A29FA.8090904@weilpublishing.com>

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.




view thread (3+ messages)

Message-ID: <20020614130037.A18880-100000@megazone23.bigpanda.com>
Permalink:  ../20020614130037.A18880-100000@megazone23.bigpanda.com/
Also on:    postgresql.org/message-id/20020614130037.A18880-100000@megazone23.bigpanda.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: sszabo@megazone23.bigpanda.com, matthew.berardi@weilpublishing.com
  Subject: Re: inheritance problems
  In-Reply-To: <20020614130037.A18880-100000@megazone23.bigpanda.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox