Re: Recording exceptions within function (autonomous transactions?) - Mailing list pgsql-general

From John R Pierce
Subject Re: Recording exceptions within function (autonomous transactions?)
Date
Msg-id 56140504.4060405@hogranch.com
Whole thread Raw
In response to Recording exceptions within function (autonomous transactions?)  (Steve Pritchard <steve.pritchard@bto.org>)
List pgsql-general
On 10/6/2015 2:38 AM, Steve Pritchard wrote:
I am porting several stored procedures from Oracle to Postgres. In the Oracle code, if an exception is thrown within a stored procedure, the exception is caught and details are written to a database table using an autonomous transaction (as the main transaction is rolled back).

we were faced with a similar task a few years ago, massive complex system with 100s of stored procedures written in Oracle's PL/SQL.   We opted to completely rebase the business logic software in a conventional high level language (Java), and only used pl/pgsql functions when they had significant performance enhancements.    This Java version was designed to work with either Oracle or Postgres, and in fact performs BETTER than the original version, and is easier to maintain.

I know thats probably not what you wanted to hear, but I'm just throwing it out there.

-- 
john r pierce, recycling bits in santa cruz

pgsql-general by date:

Previous
From: Olivier Dony
Date:
Subject: Re: Serialization errors despite KEY SHARE/NO KEY UPDATE
Next
From: droberts
Date:
Subject: Re: Best practices for aggregate table design