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 |