inheritance problem

Поиск
Список
Период
Сортировка
От Horst Herb
Тема inheritance problem
Дата
Msg-id 013901c0205d$091e4540$0100a8c0@hugin
обсуждение исходный текст
Список 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 по дате отправления:

Предыдущее
От: "Joel Burton"
Дата:
Сообщение: All function parameters become NULL if one is?
Следующее
От: "Ross J. Reedstrom"
Дата:
Сообщение: Re: 7.0.2 and 6.5.3 performance