Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] Re: Inheritance docs error.

From: "Robert B(dot) Easter" <reaster(at)comptechnews(dot)com>
To: Hannu Krosing <hannu(at)tm(dot)ee>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, Paul Govereau <pgoverea(at)akamai(dot)com>, pgsql-docs(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [HACKERS] Re: Inheritance docs error.
Date: 2001-01-02 06:59:55
Message-ID: 01010201595503.09559@comptechnews (view raw, whole thread or download thread mbox)
Lists: pgsql-docspgsql-hackers
I thought about this UNDER/INHERITS stuff months ago and wrote this file:

It might have something of value to someone.  I'm not sure everything in the 
file is correct though.

I remember the idea of UNDER is to be compatible with storing data from a 
Java program, which only does single inheritance of classes and multiple for 
interface types.  UNDER and INHERIT are different enough to be completely 
separate and coexisting.

It's an interesting subject, but I don't have anything much else to say about 
this topic since I have no plans to implement it!  I'd have to study postgres 
for another year probably first! :)

On Sunday 31 December 2000 22:57, Hannu Krosing wrote:
> Tom Lane wrote:
> > Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> > >>>> They are all correct:  UNDER is the new SQL99 syntax, INHERITS is
> > >>>> the traditional Postgres syntax.
> > >>
> > >> Current docs do appear to be erroneous: they claim the UNDER phrase
> > >> goes where INHERIT does, which is not what the grammar thinks.  I
> > >> haven't looked at SQL99 to see which is right.
> > >
> > > The grammar appears to be correct to the extent that SQL99 wants the
> > > UNDER before the column list, so I corrected the documentation at that
> > > point. However, the syntax as a whole is not SQL99-compliant.
> >
> > Hmm.  After looking at the SQL99 syntax, it seems that what we've done
> > with our grammar is to take the old INHERITS functionality and plaster
> > a vaguely-SQL-like syntax on it.  I have to wonder whether this is a
> > good idea.  I think it'll get in the way when and if we want to offer
> > true SQL99 UNDER behavior, which is only marginally related to INHERITS.
> > (In particular, SQL99 seems to want an explicit specification of the
> > structured type that's being inherited.)
> >
> > I am strongly inclined to rip out the pseudo-UNDER clause and support
> > only the old-style INHERITS syntax for 7.1.  UNDER is adding no
> > functionality and I think we will eventually regret using an SQL keyword
> > for non-SQL semantics.
> >
> > Comments?
> I'm all for it, as UNDER and INHERITS seem to offer different benefits.
> As UNDER is strictly single-inheritance, the best way to implement it
> seems
> to use a single file for all tables "under" the root table which will
> give us
> almost automatic primary keys and other constraints which are much
> trickier to
> implement or even to define for multimple inheritance (e.g. how do you
> "inherit"
> a primary key from two parents' primary keys)
> So just leave it out until we have a _real_ under implementation, or
> else
> someone will use it and lock us into backwards-compatibility trap.
> --------------
> Hannu

-------- Robert B. Easter  reaster(at)comptechnews(dot)com ---------
- CompTechNews Message Board -
- CompTechServ Tech Services -
---------- ------------

In response to


pgsql-docs by date

Next:From: Thomas LockhartDate: 2001-01-02 07:11:52
Subject: Re: [HACKERS] Re: Inheritance docs error.
Previous:From: Bruce MomjianDate: 2001-01-02 04:00:55
Subject: Re: Rather incorrect text in admin guide

pgsql-hackers by date

Next:From: Thomas LockhartDate: 2001-01-02 07:11:52
Subject: Re: [HACKERS] Re: Inheritance docs error.
Previous:From: Myron ScottDate: 2001-01-02 05:32:11
Subject: Re: Using Threads?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group