inheritance problem - Mailing list pgsql-general

From Horst Herb
Subject inheritance problem
Date
Msg-id 013901c0205d$091e4540$0100a8c0@hugin
Whole thread Raw
List pgsql-general
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






pgsql-general by date:

Previous
From: "Joel Burton"
Date:
Subject: All function parameters become NULL if one is?
Next
From: "Ross J. Reedstrom"
Date:
Subject: Re: 7.0.2 and 6.5.3 performance