Re: OO Patch - Mailing list pgsql-hackers

From Oliver Elphick
Subject Re: OO Patch
Date
Msg-id 200005222058.e4MKwLJ27019@linda.lfix.co.uk
Whole thread Raw
In response to Re: OO Patch  (Marten Feldtmann <marten@feki.toppoint.de>)
List pgsql-hackers
Marten Feldtmann wrote: >> Hannu Krosing wrote: >>   > >>   >but as E can be an INT in one subclass and TIMESTAMP or
VARBINARYin >>   >other  >>  >> I don't think that should be allowed.  It violates inheritance principles, >> since the
typesare not compatible. > > I see ... here's a person who has always programmed with typed >languages and now thinks,
thatthis is the right definition .... it's >much more out there in the world. Open your mind and think about the
>following:> > An attribute named "a" of "type" TIMESTAMP of an instance of a class >can be seen as a relation from
thisclass to the class TIMESTAMP and >this relation is named "a". > > And if you're on the way to relations you're not
faraway to see, >that a relation is of course not limited to show to one specific class >... but perhaps to all
subclassesalso ... and this is not a >violation.
 
However the example I was referring to talked of INT4, TIMESTAMP or VARBINARY.

These are not subclasses but totally unrelated.  Suppose you had 
  parent (id char(2))  child1 (a int4)  child2 (a timestamp)

and someone asks for
  select sum(a) from parent*

since the types are incompatible, the answer would be nonsense.

-- 
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight                              http://www.lfix.co.uk/oliver              PGP key from public servers; key
ID32B8FAA1                ========================================    "We are troubled on every side, yet not
distressed;we      are perplexed, but not in despair; persecuted, but not     forsaken; cast down, but not destroyed;
Alwaysbearing     about in the body the dying of the Lord Jesus, that      the life also of Jesus might be made
manifestin our      body."        II Corinthians 4:8-10 
 




pgsql-hackers by date:

Previous
From: Hannu Krosing
Date:
Subject: Re: Thus spoke SQL3 (on OO)
Next
From: Peter Eisentraut
Date:
Subject: Re: Last call for comments: fmgr rewrite [LONG]