pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert B. Easter <reaster@comptechnews.com>
Cc: Hannu Krosing <hannu@tm.ee>
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: [HACKERS] Re: Inheritance docs error.
Date: Tue, 02 Jan 2001 12:48:56 -0500
Message-ID: <12912.978457736@sss.pgh.pa.us> (raw)
In-Reply-To: <01010201595503.09559@comptechnews>
References: <Pine.LNX.4.30.0012302007350.776-100000@peter.localdomain>
	<3794.978206926@sss.pgh.pa.us>
	<3A500043.2386D0C3@tm.ee>
	<01010201595503.09559@comptechnews>

"Robert B. Easter" <reaster@comptechnews.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



view thread (13+ messages)  latest in thread

Message-ID: <12912.978457736@sss.pgh.pa.us>
Permalink:  ../12912.978457736@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/12912.978457736@sss.pgh.pa.us

 · 

reply

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: tgl@sss.pgh.pa.us, reaster@comptechnews.com, hannu@tm.ee, peter_e@gmx.net, pgoverea@akamai.com, pgsql-hackers@postgresql.org
  Subject: Re: [HACKERS] Re: Inheritance docs error.
  In-Reply-To: <12912.978457736@sss.pgh.pa.us>

* 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