From: | Robert Treat <xzilla(at)users(dot)sourceforge(dot)net> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Cc: | Gerhard Heift <ml-postgresql-20081012-3518(at)gheift(dot)de> |
Subject: | Re: Solution for tranaction independent logging in same database? |
Date: | 2009-01-02 15:01:52 |
Message-ID: | 200901021001.52345.xzilla@users.sourceforge.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Reece Hart | 2009-01-03 05:35:24 | Unison Protein Database manuscript |
Previous Message | J Ottery | 2009-01-02 10:16:45 | Re: Bind message has 6 results formats but query has 5 columns |