From: Hannu Krosing <hannu@tm.ee>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Peter Eisentraut <peter_e@gmx.net>
Cc: Paul Govereau <pgoverea@akamai.com>
Cc: pgsql-docs@postgresql.org
Cc: pgsql-hackers@postgresql.org
Subject: Re: Inheritance docs error.
Date: Mon, 01 Jan 2001 05:57:55 +0200
Message-ID: <3A500043.2386D0C3@tm.ee> (raw)
References: <Pine.LNX.4.30.0012302007350.776-100000@peter.localdomain>
<3794.978206926@sss.pgh.pa.us>
Tom Lane wrote:
>
> Peter Eisentraut <peter_e@gmx.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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-docs@postgresql.org
Cc: hannu@tm.ee, tgl@sss.pgh.pa.us, peter_e@gmx.net, pgoverea@akamai.com, pgsql-hackers@postgresql.org
Subject: Re: Inheritance docs error.
In-Reply-To: <3A500043.2386D0C3@tm.ee>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox