Re: autonomous transactions

From: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>
To: pgsql-hackers(at)postgresql(dot)org
Cc: "Roberts, Jon" <Jon(dot)Roberts(at)asurion(dot)com>
Subject: Re: autonomous transactions
Date: 2008-01-24 22:37:04
Message-ID: 200801241737.05203.xzilla@users.sourceforge.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tuesday 22 January 2008 11:02, Roberts, Jon wrote:
> I really needed this functionality in PostgreSQL. A common use for
> autonomous transactions is error logging. I want to log sqlerrm in a
> function and raise an exception so the calling application knows there is
> an error and I have it logged to a table.
>
>
>
> I figured out a way to "hack" an autonomous transaction by using a dblink
> in a function and here is a simple example:
>
>
>

This is an enhanced version of the "hack", maybe it will be of some help...
https://labs.omniti.com/trac/pgsoltools/browser/trunk/autonomous_logging_tool

--
Robert Treat
Build A Brighter LAMP :: Linux Apache {middleware} PostgreSQL

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Decibel! 2008-01-25 06:27:40 Re: autonomous transactions
Previous Message Wes 2008-01-24 19:35:00 Re: REINDEX on large DB vs. DROP INDEX/CREATE INDEX