Re: Inheritance - Mailing list pgsql-hackers

From Hannu Krosing
Subject Re: Inheritance
Date
Msg-id 1031238665.2497.29.camel@rh72.home.ee
Whole thread Raw
In response to Re: Inheritance  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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
workright 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[],
LIKEengine,  ) 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/impementationsfor fixing  multiple inheritance, then un-deprecate and keep it.
 

4) else try to remove INHERITS.

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

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




pgsql-hackers by date:

Previous
From: Hannu Krosing
Date:
Subject: test, please ignore
Next
From: Oleg Bartunov
Date:
Subject: Re: contrib/tsearch