Thread: Ouch. Inheritance hurts

Ouch. Inheritance hurts

From
Geoff Russell
Date:
Hi,

Now I know its my own fault but I was using inheritance to get similar tables.


    create table members ( XXX );
    create table members_history ( XXX , YYY ) inherits (members);

Then I copied deleted/updated records to the history file with a trigger.
On 7.1 this has the disturbing problem that all my SELECTS from members give
me the history records as well. Yes I can go through adding ONLY to all
the SELECT statements but I have another suggestion. How about:

    create table members ( XXX );
    create table members_history ( XXX , YYY ) like (members);

and have this syntax preserve the 7.0 behaviour?

As it is, if I don't want to use the ONLY keyword, then I need to recreate
all my history files with new definitions, and then I need to worry about
keeping the definitions in sync as time goes on and fields are added.

Cheers,
Geoff


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
6 Fifth Ave           +618-8332-5069 (Home)          |
St Morris SA 5068     +618-8207-2029 (Work)          | geoff@austrics.com.au
Adelaide, AUSTRALIA   +618-8364-1543 (Fax-Home)      |