Re: Multiple Inheritance

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Multiple Inheritance
Дата
Msg-id 23967.988897137@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Multiple Inheritance  ("Oliver Elphick" <olly@lfix.co.uk>)
Список pgsql-general
"Oliver Elphick" <olly@lfix.co.uk> writes:
> It's in the man page for create_table:

>        inherited_table
>               The optional INHERITS clause specifies  a  list  of
>               table  names  from  which  this table automatically
>               inherits all fields.  If any inherited  field  name
>               appears  more than once, Postgres reports an error.

Hmm, this bit of the documentation is wrong:

regression=# create table p1 (f1 int, f2 float);
CREATE
regression=# create table p2 (f1 int, f2 float, f3 int);
CREATE
regression=# create table c1(f4 int) inherits (p1,p2);
NOTICE:  CREATE TABLE: merging multiple inherited definitions of attribute "f1"
NOTICE:  CREATE TABLE: merging multiple inherited definitions of attribute "f2"
CREATE
regression=#

The NOTICE is new in 7.1, but prior versions did this sort of merging
as well.  Will fix the docs.

            regards, tom lane

В списке pgsql-general по дате отправления:

Предыдущее
От: Einar Karttunen
Дата:
Сообщение: Re: Time to insert
Следующее
От: Olivier Chapiteau
Дата:
Сообщение: column already exist (ERROR replaced by warning)