Results 1 to 3 of 3

Thread: Inheritance

  1. #1
    Join Date
    Feb 2002

    Cool Unanswered: Inheritance

    Can inheritance be a substitute to creating views in postgresql? ...
    I am quite confused with how inheritance works.

    Thanks for the help!

  2. #2
    Join Date
    Mar 2002

    Re: Inheritance

    No, You can't. Views and inheritance tables are differnt things.

    The view is subset of data extract from one or more tables. And the otherwise, the inherintace table is "table" which is extension of the other one.

    By example.

    if I had defined the table as:
    table person ( name, address, city )
    I could made a subset of the table that show me person of particullar city:
    create view person_from_queryland
    select * from person
    where city = "queryland" ;

    otherwise, I can made a extention table as:

    create table employee
    ( cardid )
    inheritence person ;

    that is Table employee which includes fields of person and cardid field.

    I omitted datatypes of tables for simplity.

  3. #3
    Join Date
    Apr 2002

    Inheritance, references Bugs

    Postgres developers took long time to admit that them inheritance wasn't working and also wasn't SQL99 !!!

    A lot's of bug are relatives of the inheritance programming way.

    in the new version 7.2.1 should fix those bugs (apparently for the inheritance it"s sure; but I havaen't test it for the REFERENCES)

    what a pity !!!
    A soo beautiful database in Open Source but little bug!

    Hope next version will be OK

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts