Re: Recording exceptions within function (autonomous transactions?)

From: John R Pierce <pierce(at)hogranch(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Recording exceptions within function (autonomous transactions?)
Date: 2015-10-06 17:29:40
Message-ID: 56140504.4060405@hogranch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Gustavo Borchez 2015-10-06 17:41:02 Auditoría y evaluación
Previous Message Hellmuth Vargas 2015-10-06 17:26:26 Re: [GENERAL] No funciona WITH con mas de 2 sentencias DML