Re: Re: [DOCS] Inheritance docs error.
От | Tom Lane |
---|---|
Тема | Re: Re: [DOCS] Inheritance docs error. |
Дата | |
Msg-id | 12912.978457736@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Re: [DOCS] Inheritance docs error. ("Robert B. Easter" <reaster@comptechnews.com>) |
Список | pgsql-hackers |
"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
В списке pgsql-hackers по дате отправления: