Обсуждение: plpgsql: copy all columns inside a trigger

Поиск
Список
Период
Сортировка

plpgsql: copy all columns inside a trigger

От
Andreas Scherbaum
Дата:
Hello,

i got a little problem:

I have a trigger fired up after insert and want to copy all colums
from NEW into another table (without knowing the exact column
names, but the target table also contains the same column names).
Is it possible to create the appropriate query in plpgsql?
The reason for this procedure is: i want to use the same trigger
for more tables and be flexible without creating a single
trigger for every new table.

Any hints?


Best regards

--
            Andreas 'ads' Scherbaum