pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: ow <oneway_111@yahoo.com>
To: pgsql-sql@postgresql.org
Subject: A generic trigger?
Date: Sat, 13 Sep 2003 18:13:47 -0700 (PDT)
Message-ID: <20030914011347.60690.qmail@web21401.mail.yahoo.com> (raw)

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



view thread (4+ messages)  latest in thread

Message-ID: <20030914011347.60690.qmail@web21401.mail.yahoo.com>
Permalink:  ../20030914011347.60690.qmail@web21401.mail.yahoo.com/
Also on:    postgresql.org/message-id/20030914011347.60690.qmail@web21401.mail.yahoo.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: oneway_111@yahoo.com
  Subject: Re: A generic trigger?
  In-Reply-To: <20030914011347.60690.qmail@web21401.mail.yahoo.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox