Re: OOP real life example (was Re: Why is MySQL more - Mailing list pgsql-hackers

From Oliver Elphick
Subject Re: OOP real life example (was Re: Why is MySQL more
Date
Msg-id 1029166783.1353.117.camel@linda
Whole thread Raw
In response to Re: OOP real life example (was Re: Why is MySQL more  (Greg Copeland <greg@CopelandConsulting.Net>)
Responses Re: OOP real life example (was Re: Why is MySQL more
List pgsql-hackers
On Mon, 2002-08-12 at 15:00, Greg Copeland wrote:
...
> Look a little deeper here.  In other OO implementations, I can define a
> class (say class a) which has no instances (abstract base class). 
> Furthermore, I can take this case and use it for building blocks
> (assuming multiple inheritance is allowed in this world) by combining
> with other classes (z inherits from a, b, c; whereby classes a, b, c
> still do not have an actual instance).  I can create an instance of my
> newly inherited class (z).
> 
> Seems to me that there is some distinction between types (classes) and
> and type instances (instance of a specific class) as it pertains to it's
> usability.
> 
> How exactly would you create an abstract base class for table type?

CREATE TABLE abstract_base (  cols ...,  CONSTRAINT "No data allowed in table abstract_base!" CHECK (1 = 0)
)

This assumes that the constraint is not inherited or can be removed in
child tables.

-- 
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight, UK                            
http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
========================================   "And he spake a parable unto them to this end, that men     ought always to
pray,and not to faint."                                                   Luke 18:1 
 



pgsql-hackers by date:

Previous
From: Andrew Sullivan
Date:
Subject: Re: [GENERAL] Linux Largefile Support In Postgresql RPMS
Next
From: Lamar Owen
Date:
Subject: Re: [GENERAL] Linux Largefile Support In Postgresql RPMS