From: | "Maurice Gittens" <mgittens(at)gits(dot)nl> |
---|---|
To: | "Thomas G(dot) Lockhart" <lockhart(at)alumni(dot)caltech(dot)edu>, "PostgreSQL-development" <hackers(at)postgresql(dot)org> |
Subject: | Re: [QUESTIONS] Re: [HACKERS] text should be a blob field |
Date: | 1998-03-15 17:07:12 |
Message-ID: | 017801bd5034$cccc3b60$fcf3b2c2@caleb..gits.nl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
-----Original Message-----
From: Thomas G. Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>
To: PostgreSQL-development <hackers(at)postgresql(dot)org>
Cc: Maurice Gittens <mgittens(at)gits(dot)nl>
Date: zondag 15 maart 1998 22:24
Subject: Re: [QUESTIONS] Re: [HACKERS] text should be a blob field
>> Since triggers are not inherited this doesn't seem appropiate to me
>> -:(. Won't user have to do some magic on inherited tables?
>>
>> I think many things will be fixed when triggers, indices etc. are
>> inherited properly by derived classes.
>
>This is an interesting point. We have perhaps been neglecting to discuss
>how inheritance should behave with new features. Certainly at least some
>things (like default values and constraints) do inherit as you would
>expect. It's not clear to me that inheriting indices is appropriate,
>since indices are basically just an artifact for performance
>improvement;
Yes I agree.
> the results of a query do not change with the presence of
>an index. Also, if a table is inherited, then the access pattern of the
>resulting table might be different, requiring a different index anyway.
In general OO terms code reuse (in our case trigger reuse? -:) ) is achieved
by inheriting as much as sanely possible.
Since (from an OO perspective) every instance of a derived class is also an
instance of it's base class(es), inheriting indices seems like a natural
thing
to me.
However it may be possible that an OO database makes different choices
than an OO programming language.
>
>I haven't worked with triggers; what is their current behavior with
>inheritance? Maurice implies that they are not inherited at all. If not,
>should they be?
Well if we want to support polymorphism the answer to this question is a
definite yes.
In general any operation defined on an instance of a base class should be
defined on an instance of a derived class. This is the main reason
we inherit in the first place. The user has the option of redefining
(specializing)
an operation for instances of derived classes if she/he so pleases.
I think proper support for this would be really cool.
With regards from Maurice.
From | Date | Subject | |
---|---|---|---|
Next Message | Brian Grossman | 1998-03-15 23:50:15 | Re: [QUESTIONS] using composite types |
Previous Message | Thomas G. Lockhart | 1998-03-15 15:19:48 | Re: [QUESTIONS] Re: [HACKERS] text should be a blob field |