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

Re: warning missing

From: Gaetano Mendola <mendola(at)bigfoot(dot)com>
To: Thomas Hallgren <thhal(at)mailblocks(dot)com>
Subject: Re: warning missing
Date: 2004-06-23 18:55:59
Message-ID: 40D9D23F.3060907@bigfoot.com (view raw or flat)
Thread:
Lists: pgsql-hackers
Thomas Hallgren wrote:

> 
> Speaking in generic OO terms, using inheritance, you cannot remove
> attributes that are present in the generalisation. If B inherits A, an
> instance of B is per definition also an instance of A. Thus, you must alwasy
> be able to cast a B into an A. In short, If you don't want the OID, you
> cannot inherit a something that has an OID.

This is not completely true:

struct B
{
    void foo();
};


class D : public B
{
    private:
       void foo();

    public:
       void bar();
};


as you can see a D "is a" B but the publich foo() doesn't
appartaint to D, at least an user of D could not use foo()


> Having said that, I think a warning is motivated. The warning should state
> that attributes (columns) present in the generalisation (the parent table)
> cannot be hidden.

Right.



Regards
Gaetano Mendola




In response to

Responses

pgsql-hackers by date

Next:From: Peter MartiniDate: 2004-06-23 19:07:42
Subject: Re: BLOBs and a virtual file system
Previous:From: Merlin MoncureDate: 2004-06-23 16:49:15
Subject: Re: PREPARE and transactions

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