Re: Inheritance

From: Hannu Krosing <hannu(at)tm(dot)ee>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Jeff Davis <list-pgsql-hackers(at)empires(dot)org>, Curt Sampson <cjs(at)cynic(dot)net>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Inheritance
Date: 2002-09-05 15:10:59
Message-ID: 1031238665.2497.29.camel@rh72.home.ee
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 2002-09-05 at 19:23, Tom Lane wrote:
> I really like Hannu's idea of storing an entire (single-inheritance)
> hierarchy in a single file.
>
> I guess the question we need to ask ourselves is if we're prepared to
> abandon support of multiple inheritance. Personally I am, but...

So am I, but I think we should move in stages -

1) first implement the SQL99 standard
CREATE TABLE mytable() UNDER parenttable ;
using the above idea and make it work right vs constraints,
triggers, functions, etc.

This should include the ability to include other table structures
using LIKE :

CREATE TABLE engine(...);
CREATE TABLE vehicule(...);
CREATE TABLE car (
model text,
wheels wheel[],
LIKE engine,
) UNDER vehicule;

which could then hopefully be used for migrating most code of form

CREATE TABLE car (
model text primary key,
wheels wheel[]
) INHERITS (vehicule, engine);

it would be nice (maybe even neccessary) to keep the current
functionality that columns introduced by LIKE are automatically
added/renamed/deleted when LIKE's base table changes.

2) when it is working announce non-SQL99-standard-and-broken INHERITS
to be deprecated and removed in future.

3) give people time for some releases to move over to UNDER + LIKE .
Or if someone comes up with bright ideas/impementations for fixing
multiple inheritance, then un-deprecate and keep it.

4) else try to remove INHERITS.

5) if too many people object, goto 3) ;)

-------------------
Hannu

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2002-09-05 15:12:01 Re: 7.2 - 7.3 activity
Previous Message Hannu Krosing 2002-09-05 15:10:09 test, please ignore