X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 07F57529FF for ; Fri, 29 Jul 2005 10:34:06 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 42243-05 for ; Fri, 29 Jul 2005 13:33:57 +0000 (GMT) Received: from fmed.uba.ar (mail.fmed.uba.ar [157.92.152.1]) by svr1.postgresql.org (Postfix) with ESMTP id A070552998 for ; Fri, 29 Jul 2005 10:33:55 -0300 (ADT) Received: from webmail.fmed.uba.ar (localhost [127.0.0.1]) by fmed.uba.ar (Postfix) with SMTP id 2414617499 for ; Fri, 29 Jul 2005 10:36:52 -0300 (ART) Received: from 157.92.152.53 (proxying for unknown) (SquirrelMail authenticated user gherzig) by webmail.fmed.uba.ar with HTTP; Fri, 29 Jul 2005 10:36:52 -0300 (ART) Message-ID: <35926.157.92.152.53.1122644212.squirrel@webmail.fmed.uba.ar> Date: Fri, 29 Jul 2005 10:36:52 -0300 (ART) Subject: calling EXECUTE on any exception From: gherzig@fmed.uba.ar To: pgsql-sql@postgresql.org User-Agent: SquirrelMail/1.4.2 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 Importance: Normal X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.178 tagged_above=0 required=5 tests=NO_REAL_NAME X-Spam-Level: X-Archive-Number: 200507/241 X-Sequence-Number: 22219 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.