inheritance problem

From: "Horst Herb" <hherb(at)malleenet(dot)net(dot)au>
To: <pgsql-general(at)hub(dot)org>
Cc: <pgsql-interface(at)hub(dot)org>
Subject: inheritance problem
Date: 2000-09-17 04:01:05
Message-ID: 013901c0205d$091e4540$0100a8c0@hugin
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 each table.

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

Browse pgsql-general by date

  From Date Subject
Next Message Neil Conway 2000-09-17 04:15:37 LOCK TABLE question
Previous Message Ross J. Reedstrom 2000-09-17 03:45:34 Re: 7.0.2 and 6.5.3 performance