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

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: (view raw, whole thread or download thread mbox)
Lists: pgsql-docspgsql-hackers
"Robert B. Easter" <reaster(at)comptechnews(dot)com> writes:
> I thought about this UNDER/INHERITS stuff months ago and wrote this file:

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

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


pgsql-docs by date

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

pgsql-hackers by date

Next:From: Peter EisentrautDate: 2001-01-02 19:36:49
Subject: Re: pgsql/src (
Previous:From: Alfred PerlsteinDate: 2001-01-02 17:24:25
Subject: Re: Using Threads?

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