transaction and triggers

From: Gerardo Herzig <gherzig(at)fmed(dot)uba(dot)ar>
To: pgsql-sql(at)postgresql(dot)org
Subject: transaction and triggers
Date: 2008-01-18 14:17:46
Message-ID: 4790B50A.5050101@fmed.uba.ar
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Filip Rembiałkowski 2008-01-18 14:42:21 Re: transaction and triggers
Previous Message Kevin Jenkins 2008-01-16 23:50:41 Re: How to test/read a stored procedure that returns a boolean?