Re: Multiple Inheritance

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Oliver Elphick" <olly(at)lfix(dot)co(dot)uk>
Cc: tankgirl(at)worldonline(dot)es, pgsql-general(at)postgresql(dot)org
Subject: Re: Multiple Inheritance
Date: 2001-05-03 13:38:57
Message-ID: 23967.988897137@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Oliver Elphick" <olly(at)lfix(dot)co(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jason 2001-05-03 13:43:44 Re: psql with PHP question
Previous Message Einar Karttunen 2001-05-03 13:38:34 Re: Time to insert