Re: [HACKERS] Re: Inheritance docs error.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Robert B(dot) Easter" <reaster(at)comptechnews(dot)com>
Cc: Hannu Krosing <hannu(at)tm(dot)ee>, 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 17:48:56
Message-ID: 12912.978457736@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs pgsql-hackers

"Robert B. Easter" <reaster(at)comptechnews(dot)com> writes:
> I thought about this UNDER/INHERITS stuff months ago and wrote this file:
> http://www.comptechnews.com/~reaster/pgoo.html

Good analysis, especially the fundamental point that UNDER is only
designed to support single inheritance, whereas INHERITS allows multiple
inheritance.

The current grammar treats UNDER as interchangeable with INHERITS,
including allowing multiple names to be listed as UNDER. That would
certainly be a fatal mistake, since it would create a backwards
compatibility problem as soon as we wanted to support any of the
features of UNDER that require single inheritance.

> I'm not sure everything in the file is correct though.

One thing that bothered me is that my reading of the SQL99 draft
disallows the UNDER syntax you are using. I read:

<table definition> ::=
CREATE [ <table scope> ] TABLE <table name>
<table contents source>
[ ON COMMIT <table commit action> ROWS ]

<table contents source> ::=
<table element list>
| OF <user-defined type>
[ <subtable clause> ]
[ <table element list> ]

<subtable clause> ::=
UNDER <supertable clause>

<supertable clause> ::= <supertable name>

It looks to me like "UNDER <table name>" cannot appear without a
preceding "OF <user-defined type>". I am not clear on the semantic
implications of the OF clause.

Anyway, we seem to have a clear consensus to pull the UNDER clause from
the grammar and stick with INHERITS for 7.1. I will take care of that
in the next day or so.

regards, tom lane

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Bruce Momjian 2001-01-02 21:07:56 Re: Re: MySQL and PostgreSQL speed compare
Previous Message Thomas Lockhart 2001-01-02 07:11:52 Re: [HACKERS] Re: Inheritance docs error.

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2001-01-02 19:36:49 Re: pgsql/src (Makefile.global.in)
Previous Message Alfred Perlstein 2001-01-02 17:24:25 Re: Using Threads?