Re: Triggers Help...

From: Gaetano Mendola <mendola(at)bigfoot(dot)com>
To: "pgsql-sql(at)postgresql(dot)org" <pgsql-sql(at)postgresql(dot)org>
Cc: tiagoalves(at)brturbo(dot)com
Subject: Re: Triggers Help...
Date: 2003-09-17 22:20:59
Message-ID: 3F68DE4B.1020302@bigfoot.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

tiagoalves(at)brturbo(dot)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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message tom baker 2003-09-18 05:07:08 transaction locking
Previous Message Miko O Sullivan 2003-09-17 21:50:57 Need more examples (was "session variable")