From: Gaetano Mendola <mendola@bigfoot.com>
To: pgsql-sql@postgresql.org <pgsql-sql@postgresql.org>
Cc: tiagoalves@brturbo.com
Subject: Re: Triggers Help...
Date: Thu, 18 Sep 2003 00:20:59 +0200
Message-ID: <3F68DE4B.1020302@bigfoot.com> (raw)
In-Reply-To: <14572644.1063819235613.JavaMail.nobody@webmail2.brturbo.com>
References: <14572644.1063819235613.JavaMail.nobody@webmail2.brturbo.com>
tiagoalves@brturbo.com wrote:
> Hi,
>
> I have two databases with the same tables, one is my Real Database and the other is my Log Database.
> My Log database does NOT have any kind of keys (PRIMARY or FOREIGN).
>
> I need to insert from my Real database to my Log database every row that is Updated or Deleted in any Table of the Real database.
>
> I need to create triggers (BEFORE DELETE or BEFORE UPDATE) to each of my Real database tables, these triggers will INSERT into my Log database table the row that is being deleted or/and updated in the Real Database tables.
>
> I dont know how to do this? Anyone can help me?
What you are looking for is a replication tools, look
here: http://www.postgresql.org/news/147.html
Regards
Gaetano Mendola
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: mendola@bigfoot.com, tiagoalves@brturbo.com
Subject: Re: Triggers Help...
In-Reply-To: <3F68DE4B.1020302@bigfoot.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