Re: OO Patch

From: "Oliver Elphick" <olly(at)lfix(dot)co(dot)uk>
To: Marten Feldtmann <marten(at)feki(dot)toppoint(dot)de>
Cc: Oliver Elphick <olly(at)lfix(dot)co(dot)uk>, Postgres Hackers List <hackers(at)postgresql(dot)org>, olly(at)linda(dot)lfix(dot)co(dot)uk
Subject: Re: OO Patch
Date: 2000-05-22 20:58:21
Message-ID: 200005222058.e4MKwLJ27019@linda.lfix.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Marten Feldtmann wrote:
>> Hannu Krosing wrote:
>> >
>> >but as E can be an INT in one subclass and TIMESTAMP or VARBINARY in
>> >other
>>
>> I don't think that should be allowed. It violates inheritance principles,
>> since the types are not compatible.
>
> I see ... here's a person who has always programmed with typed
>languages and now thinks, that this 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 this class to the class TIMESTAMP and
>this relation is named "a".
>
> And if you're on the way to relations you're not far away to see,
>that a relation is of course not limited to show to one specific class
>... but perhaps to all subclasses also ... 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(dot)Elphick(at)lfix(dot)co(dot)uk
Isle of Wight http://www.lfix.co.uk/oliver
PGP key from public servers; key ID 32B8FAA1
========================================
"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; Always bearing
about in the body the dying of the Lord Jesus, that
the life also of Jesus might be made manifest in our
body." II Corinthians 4:8-10

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Hannu Krosing 2000-05-22 21:07:32 Re: OO Patch
Previous Message Murad Nayal 2000-05-22 20:53:07 Re: [BUGS] port v7.0 to SGI-IRIX-6.5.7/64