transaction and triggers - Mailing list pgsql-sql

From Gerardo Herzig
Subject transaction and triggers
Date
Msg-id 4790B50A.5050101@fmed.uba.ar
Whole thread Raw
Responses Re: transaction and triggers  ("Filip Rembiałkowski" <plk.zuber@gmail.com>)
List pgsql-sql
Hi all. Im puzzled again. Just thinking:

As im having fun trying to make my own replication system, im stuck in 
this situation:
Consider a simple table with a unique index on the `id' field, and a 
function who will fail, such as

insert into test (id) values (1);
insert into test (id) values (1);

This will fail and the transaction will be rollback'ed, but as the basis 
of my replication system is on row level triggers, the first time the 
insert is called, the trigger will be executed, and i will like to be 
able to stack the triggers in some way, in order to be fired only after 
a succesfull execution of the hole function.

Im also reading the NOTIFY/LISTEN mechanism and the rule system as a 
workarround on this, but the fact is that there is a lot of client code, 
and will take a big amount of time to change it.

Any sugestions?

Thanks!
Gerardo


pgsql-sql by date:

Previous
From: Kevin Jenkins
Date:
Subject: Re: How to test/read a stored procedure that returns a boolean?
Next
From: "Filip Rembiałkowski"
Date:
Subject: Re: transaction and triggers