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

ROLLBACK triggers?

From: Daisuke Maki <daisuke(at)wafu(dot)ne(dot)jp>
To: pgsql-hackers(at)postgresql(dot)org
Subject: ROLLBACK triggers?
Date: 2006-01-23 09:35:18
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers

First, apologies if my question is a bit off-course. Please feel free to
direct me to a different mailing list if not appropriate.

I'm currently trying to embed Senna full text search engine
( into postgres. I'm trying to achieve this by
using triggers (implemented in C) to cause an update to senna's index at
various points.

This seemed to work fine until I realized that while postgres' SQL
commands could be rolled back, Senna's index remained already-changed.
There are other potential issues with regards to transaction safety, but
currently this seems to be a problem that I cannot fix by simply
patching Senna. So I thought that if there was a rollback trigger, I
could call whatever necessary to undo the changes that were made to the

A quick scan of the docs and the source code tree seems to indicate that
there is no such thing as a rollback trigger, short of hacking it.

Now, I'm wondering:
  1. Is there a rollback/commit trigger? If not, is it planned to be
     implemented at all?
  2. Is there a way to undo changes to data external to postgres
     when a rollback occurs, OR, only update that external data
     when a commit occurs?

Thanks in advance,


pgsql-hackers by date

Next:From: Tom LaneDate: 2006-01-23 16:13:25
Subject: Re: [PATCHES] postmaster/postgres merge for testing
Previous:From: Gurjeet SinghDate: 2006-01-23 09:18:07
Subject: Re: [HACKERS] Need help in installing postgresql 8.1.2 on Windows

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