Thread: inheritance problem

inheritance problem

From
"Horst Herb"
Date:
I have a table "child" that inherits "parent".
How can I write a generic trigger function for "on updates" of "parent" that will
a) be able to inspect all columns of "parent"
b) through inheritance inspect all columns of "child" when "child" is updated

As I have hundreds of tables it is crucial to have ONE generic function doing this instead of a separate function for
eachtable. 

The way I though it might work was
- the trigger function passes the OID to the lookup function
- the lookup function looks up the table / attributes in the system tables
- and then does the inspection for each column found through the system table lookup

But shurely, there must be a more elegant & efficient way to do this?

Horst