Inheritance - Mailing list pgsql-general

From Ian Turner
Subject Inheritance
Date
Msg-id Pine.LNX.4.21.0007280706490.828-100000@crafter.house
Whole thread Raw
Responses Re: Inheritance  ("Oliver Elphick" <olly@lfix.co.uk>)
List pgsql-general
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Is there a way to set it up so that tables B and C are both children of
table A, but where if you add records to B or C, they will show up in A as
well (albiet without the extra fields provided by B and C)?

In case that wasn't thouroughly confusing, allow me to try another
analogy:

CREATE TABLE Entities (num serial PRIMARY KEY);
CREATE TABLE Corporations (name char(40));
CREATE TABLE Players (name char(40),
              corp integer REFERENCES Corporations
) INHERITS Entities;

Now, if I insert something into players, like so:
INSERT INTO Players (name) VALUES ('John');

John WILL get a number pulled from the same set as the entity and
corporation tables, but John WILL NOT show up in the entities table. Is
there any way to get new entries in child tables to show up in the parent
table?

Ian
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.1 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE5gZTFfn9ub9ZE1xoRAmx8AKDglWulL4eo4mvTYosaIGbsv/rj/QCgzd4H
jcD02dIs1JkM4U4uKkg7zr4=
=86pb
-----END PGP SIGNATURE-----


pgsql-general by date:

Previous
From: Jeffery Collins
Date:
Subject: Re: Connection problem under extreme load.
Next
From: Thomas Lockhart
Date:
Subject: Re: ALTER TABLE has not effect on children tables?