A generic trigger?

From: ow <oneway_111(at)yahoo(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: A generic trigger?
Date: 2003-09-14 01:13:47
Message-ID: 20030914011347.60690.qmail@web21401.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Richard Sydney-Smith 2003-09-14 04:25:58 Use derived expression in select statement
Previous Message Robert Treat 2003-09-13 23:44:55 Re: createlang plpgsql failing on redhatlinux7.2