Re: Can I catch sentences in SQL using triggers? - Mailing list pgsql-general

From Richard Huxton
Subject Re: Can I catch sentences in SQL using triggers?
Date
Msg-id 429DEB47.1050103@archonet.com
Whole thread Raw
In response to Re: Can I catch sentences in SQL using triggers?  (Manuel García <mgarciah@ife.org.mx>)
List pgsql-general
Manuel García wrote:
> Ok. Richard, that is that I need to do, I need to create a log table
> with all the information that is changed on every row that was update,
> delete or insert, additionally I must be record the user that do that.
> At this point I don't have troubles I can do that, but I need to get the
> full sentence because I want to use that to update other database but
> only apply the last changes, in the case of insert of course doesn't
> exist problem but in the case of dalete and update yes. That is because
> I need to catch the sentences of insert update an delete but full.

Sounds like you want to use one of the existing replication solutions -
perhaps try a search on slony.

PS - merely tracking the top-level SQL isn't enough to guarantee you can
reproduce the changes to the database.
--
   Richard Huxton
   Archonet Ltd


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: How to wait until startup completes
Next
From: Gary Horton
Date:
Subject: Re: How to wait until startup completes