Re: foreign Key problem

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Dave Page <dpage(at)vale-housing(dot)co(dot)uk>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: foreign Key problem
Date: 2002-06-24 15:14:34
Message-ID: 20020624081120.D40553-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, 24 Jun 2002, Dave Page wrote:

> > Foreign keys don't inherit across tables currently, so when
> > t4 references t1, it references *only* t1. It won't see rows
> > from t2. Alot of things don't inherit "properly" right now
> > (also note that the primary key on t1_id doesn't inherit so,
> > you don't even have guaranteed uniqueness across t1_id). In
> > general inheritance needs some work.
>
> Yes, that was roughly the conclusion that I've been coming to over the
> weekend. It's annoying 'cos I always thought that inheritance was one of
> the big PostgreSQL pluses and the first time I find a good use for the
> feature it fails me bigtime :-(

Inheritance needs a few champions who are willing to put time into making
sure that it gets to the point where it has all these features or at
least to help spec out what all these features should do.

As a side note, if you're willing to do a few extra inserts, there are
some workarounds for the foreign key case involving another table
where you get ids from there and reference that table from each of the
tables in the hierarchy and tables that want to reference the hierarchy
reference that table.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Dave Page 2002-06-24 15:20:17 Re: foreign Key problem
Previous Message Pablo Morales 2002-06-24 14:57:23 initdb