Re: Inheritance

From: Greg Copeland <greg(at)CopelandConsulting(dot)Net>
To: Hannu Krosing <hannu(at)tm(dot)ee>
Cc: Curt Sampson <cjs(at)cynic(dot)net>, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Peter Gulutzan <71022(dot)733(at)compuserve(dot)com>, PostgresSQL Hackers Mailing List <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Inheritance
Date: 2002-09-06 13:01:27
Message-ID: 1031317288.1466.102.camel@mouse.copelandconsulting.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 2002-09-05 at 15:51, Hannu Krosing wrote:
> On Fri, 2002-09-06 at 03:19, Greg Copeland wrote:
> >
> > What about the concept of columns being public or private? That is,
> > certain columns may not be inherited by a child? Any thought to such a
> > concept? Perhaps different types of table inheritance can be considered
> > in our model...has-a, is-a, etc...
>
> I can't fit this in my mental model of table inheritance for two reasons
>
> 1) all parent table columns must be present in child

Okay, I must admit, I'm not really sure why. If we look at it in a
physical versus logical manner, even if it's physically there, why must
it be logically exposed? Can you help me understand why it would even
need to physically be there. After all, if a child can't update it,
they don't need to see it.

>
> 2) granting some right to parent should automatically allow selecting
> from children

Unless the parent deemed it inappropriate access (private)?

If a column were deemed private, that would have a couple of
stipulations on it. That is, it would have to ensure that "NOT NULL"
where not one of the constraints, or, if it did, ensure that a default
value were also provided.

>
> both are required for select/insert/update/delete to work on table and
> its children (i.e. without ONLY)
>
>
> But maybe i just need to think more about it ;)
>

Well, I guess I'm lagging behind you on this manner. Perhaps "holding
my hand" and explaining it a bit will allow you to work through it some
more and help bring me in line with what you're thinking.

Greg

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jason Tishler 2002-09-06 13:06:43 Re: [HACKERS] 7.3 Beta 1 Build Error on Cygwin
Previous Message Tom Lane 2002-09-06 13:01:05 Re: abou the cost estimation