A generic trigger? - Mailing list pgsql-sql

From ow
Subject A generic trigger?
Date
Msg-id 20030914011347.60690.qmail@web21401.mail.yahoo.com
Whole thread Raw
Responses Re: A generic trigger?
List pgsql-sql
Hi,

Am looking for a way to minimize the amount of fuctions that support triggers.
E.g., there's "company" and "company_backup" tables. Update trigger on the
"company" table will put a record in the "company_backup" table whenever
"company" record is updated.

The problem is that there's quite a few other tables for which similar backup
logic has to be done (e.g. "custormer" and "customer_backup", etc). The backup
logic is the same, only structure of the tables changes.

Is there a way to write a generic trigger/function that would deal with backup
regardless of the table structure?

Thanks in advance.








__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com


pgsql-sql by date:

Previous
From: Robert Treat
Date:
Subject: Re: createlang plpgsql failing on redhatlinux7.2
Next
From: "Richard Sydney-Smith"
Date:
Subject: Use derived expression in select statement