Log, via triggers.

From: neko(at)sid(dot)sth(dot)szif(dot)hu
To: pgsql-admin(at)postgresql(dot)org
Subject: Log, via triggers.
Date: 1999-01-02 19:29:51
Message-ID: Pine.LNX.4.02.9901021926460.16589-100000@sid.sth.szif.hu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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)
... can anybody give another solution for logging?

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

Browse pgsql-admin by date

  From Date Subject
Next Message Vazsonyi Peter 1999-01-02 20:49:57 Log, via triggers.
Previous Message Marc Eggenberger 1999-01-02 16:45:54 Moving postgre db's from a 6.3 to a 6.4 on a new machine