Re: Solution for tranaction independent logging in same database? - Mailing list pgsql-general

From Robert Treat
Subject Re: Solution for tranaction independent logging in same database?
Date
Msg-id 200901021001.52345.xzilla@users.sourceforge.net
Whole thread Raw
In response to Solution for tranaction independent logging in same database?  (Gerhard Heift <ml-postgresql-20081012-3518@gheift.de>)
List pgsql-general
On Friday 02 January 2009 03:53:58 Gerhard Heift wrote:
> On Thu, Jan 01, 2009 at 02:41:08PM +0100, Gerhard Heift wrote:
> > Hello,
> >
> > I want to log with triggers or in functions, and these logs should be
> > independet of the transaction. Beside i want to have the information
> > which action was commited and which not.
> >
> > So my idea was to log into the same database with dblink, return the
> > primary keys and add them into a commit table.
> >
> > But my problem is, that I do not now how to write the rule properly.
> >

We created a similar project to this which is in the pgsoltools repo;
http://labs.omniti.com/trac/pgsoltools/browser/trunk/autonomous_logging_tool

This was originally created to mimic logging done in long-running Oracle
PL/SQL functions using autonomous commits, but should work within any trigger
functions on the postgres side as well (or at least givec you a good starting
point to adapt it).  HTH

--
Robert Treat
Conjecture: http://www.xzilla.net
Consulting: http://www.omniti.com

pgsql-general by date:

Previous
From: J Ottery
Date:
Subject: Re: Bind message has 6 results formats but query has 5 columns
Next
From: Reece Hart
Date:
Subject: Unison Protein Database manuscript