Q: Log, via triggers

From: "Vazsonyi Peter[ke]" <neko(at)kornel(dot)szif(dot)hu>
To: hackers(at)postgreSQL(dot)org
Subject: Q: Log, via triggers
Date: 1999-01-04 16:06:15
Message-ID: Pine.A32.4.05.9901041702230.16028-100000@kornel.szif.hu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello

I tried create a small logging utility for postgresql (6.4, i use it on
redhat-linux-5.2)
I meand with triggers 'n SPI all database change can be hooked.
But this have small problem: in an aborted transaction the triggers run on
changes, but NOT run with the undos.
4xmpl.:
--
my=> Begin;
my=> insert into test values ( 'now',0,'Text' );
NOTICE: trigf(): Ok, Insert event sent to log server.
INSERT [5234]
my=> -- Succesfully logged. BUT:
my-> rollback;
ROLLBACK
my=> -- Not logged ;(
--
Can postgres call trigger beetween rollbacks too? (Nawp: all changes must be
succesfully undoned, this can not depending on triggers)

Ok, that is not works, but realy want to logging to go outside the database.

... can anybody give a solution to this?

--
NeKo@(kva.hu|Kornel.szif.hu) the servant of Crash

Browse pgsql-hackers by date

  From Date Subject
Next Message Blashko Alexander 1999-01-04 16:14:57 pg_options ?
Previous Message Vazsonyi Peter[ke] 1999-01-04 16:01:48 Q: CURSOR tuples count