Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
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?



pgsql-sql by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group