Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 9A5782E2DAF for ; Thu, 15 Nov 2007 10:14:38 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 21978-05 for ; Thu, 15 Nov 2007 10:14:37 -0400 (AST) Received: from news.hub.org (news.hub.org [200.46.204.72]) by postgresql.org (Postfix) with ESMTP id 183CA2E2D22 for ; Thu, 15 Nov 2007 10:14:38 -0400 (AST) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.14.1/8.14.1) with ESMTP id lAFEEV6M059082 for ; Thu, 15 Nov 2007 10:14:32 -0400 (AST) (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.14.1/8.14.1/Submit) id lAFDjKjv050362 for pgsql-sql@postgresql.org; Thu, 15 Nov 2007 09:45:20 -0400 (AST) (envelope-from news) From: "Sabin Coanda" X-Newsgroups: pgsql.sql Subject: trap for any exception Date: Thu, 15 Nov 2007 15:45:20 +0200 Organization: Hub.Org Networking Services Lines: 15 Message-ID: X-Complaints-To: usenet@news.hub.org X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.3138 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 To: pgsql-sql@postgresql.org X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200711/75 X-Sequence-Number: 29603 Hi there, I'd like to build a PL/pgSQL function which is able to generic trap any error, and interpret it. I read 37.7.5. Trapping Errors, but the syntax requires to write explicitly the exception condition, and not a generic one. Is it possible to build a generic trap or do you know a workaround for that ? TIA, Sabin