calling EXECUTE on any exception

From: gherzig(at)fmed(dot)uba(dot)ar
To: pgsql-sql(at)postgresql(dot)org
Subject: calling EXECUTE on any exception
Date: 2005-07-29 13:36:52
Message-ID: 35926.157.92.152.53.1122644212.squirrel@webmail.fmed.uba.ar
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi all: I want to call some FUNCTION , let say
exception_hanler(Exception_code) for any exception in plsql functions. I
give some pseudo code to explain myself better:

CREATE FUNCION something(...) returns ...
AS
'
...

EXCEPTION
WHEN OTHER THEN
EXECUTE exception_handler(Exception_code)
...
'

and let exception_handler() function make all the work and returns some
value for mi program...Now, the actual question...how do i get that
error_code (or code_name, whatever i can get) generated in the something()
function to be proccesed by the exception_handler() function?

Im talking of 8.0 plsql language by the way.

Thanks in advance!
--
Gerardo Herzig
Direccion General de Organizacion y Sistemas
Facultad de Medicina

U.B.A.

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Michael Fuhr 2005-07-29 14:45:33 Re: calling EXECUTE on any exception
Previous Message Olivier Hubaut 2005-07-29 13:33:26 Why are these queries so different in time?