From: | Janning Vygen <vygen(at)planwerk6(dot)de> |
---|---|
To: | Renaud Thonnart <thonnart(at)amwdb(dot)u-strasbg(dot)fr>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: table inheritance |
Date: | 2001-05-13 14:30:15 |
Message-ID: | 01051316301502.02668@janning |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Am Sonntag, 13. Mai 2001 15:28 schrieb Renaud Thonnart:
> Hi!
>
> Could someone give me a easy example of creating and using table
> inheritance?
lokk in the tutorial shipped with postgres:
Chapter 6. Advanced Postgres SQL Features (advanced.htm)
-- from postgres tutorial ---
Inheritance
Let's create two classes. The capitals class contains state capitals which
are also cities. Naturally, the capitals class should inherit from cities.
CREATE TABLE cities (
name text,
population float,
altitude int -- (in ft)
);
CREATE TABLE capitals (
state char(2)
) INHERITS (cities);
[.....]
janning
--
Planwerk 6 /websolutions
Herzogstrae 86
40215 Dsseldorf
fon 0211-6015919
fax 0211-6015917
http://www.planwerk6.de
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2001-05-13 15:12:55 | Re: [PATCHES] Re: microsecond log timestamps |
Previous Message | Vince Vielhaber | 2001-05-13 14:28:53 | Re: [PATCHES] Re: microsecond log timestamps |