Re: warning missing
| От | Gaetano Mendola | 
|---|---|
| Тема | Re: warning missing | 
| Дата | |
| Msg-id | 40D9D23F.3060907@bigfoot.com обсуждение исходный текст | 
| Ответ на | Re: warning missing ("Thomas Hallgren" <thhal@mailblocks.com>) | 
| Ответы | Re: warning missing | 
| Список | 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
		
	В списке pgsql-hackers по дате отправления: