Skip site navigation (1) Skip section navigation (2)

Inheritance in Postgresql ?

From: ABBAS SHAKEEL <shakeel(dot)abbas(dot)qau(at)gmail(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Inheritance in Postgresql ?
Date: 2009-12-16 06:36:48
Message-ID: (view raw or whole thread)
Lists: pgsql-admin

I am not an expert for database but rarely design database for Web and IVR

Today I wonder if there is any practical advantage of inheritance of Tables.

Lets take the same example that is commonly referred.

    name            text,
    population      float,
    altitude        int     -- in feet

CREATE TABLE capitals (
    state           char(2)
) INHERITS (cities);

Capital table inherit attributes from Cities but no data. I am
confused with concept of inheritance in postgres.

In These tables what i was supposing is inheritence as that in JAVA. but its
seems to be  a different scene.

Can some one Please compare inheritence in JAVA and Postgresql OR make me
clear about for what inheritance is introduced in Postgres.

Best Regards
Shakeel Abbas


pgsql-admin by date

Next:From: Scott MarloweDate: 2009-12-16 06:51:56
Subject: Re: Inheritance in Postgresql ?
Previous:From: Gurjeet SinghDate: 2009-12-16 05:18:45
Subject: Re: Internal fragmentations statistics Was: VACUUM FULL memory requirements

Privacy Policy | About PostgreSQL
Copyright © 1996-2015 The PostgreSQL Global Development Group