Re: inheritance

From: Richard Broersma Jr <rabroersma(at)yahoo(dot)com>
To: Shane Ambler <pgsql(at)Sheeky(dot)Biz>, chester c young <chestercyoung(at)yahoo(dot)com>
Cc: sql pgsql <pgsql-sql(at)postgresql(dot)org>, greg(dot)toombs(at)bluebottle(dot)com
Subject: Re: inheritance
Date: 2007-03-08 22:11:53
Message-ID: 534635.55952.qm@web31811.mail.mud.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

>
> Maybe then you'll add a table basket that has a foreign key to the fruit
> table....... ;-)

From the inheritance link:
...
A serious limitation of the inheritance feature is that indexes (including unique constraints) and
foreign key constraints only apply to single tables, not to their inheritance children. This is
true on both the referencing and referenced sides of a foreign key constraint.
...

You can create a foreign key to the fruit table to a table basket, but this foreign key will only
work for fruit that was directly inserted into the fruit table. Any fruit inserted into the
Apples or Oranges table can not be referenced by the table basket. I believe that this limitation
in table inheritance will not work for Greg's requirements.

Having said this, it would make me very happy if I am wrong. I hate modeling data the hard way
when there is a better way of doing it. ;)

Regards,
Richard Broersma Jr.

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message chester c young 2007-03-08 22:20:16 Re: inheritance
Previous Message Shane Ambler 2007-03-08 21:46:37 Re: inheritance