Received: from localhost (unknown [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 0C4112E2D59 for ; Thu, 15 Nov 2007 11:35:11 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 86329-05 for ; Thu, 15 Nov 2007 11:34:48 -0400 (AST) Received: from megazone.bigpanda.com (megazone.bigpanda.com [64.147.171.210]) by postgresql.org (Postfix) with ESMTP id A88B22E2DAA for ; Thu, 15 Nov 2007 11:35:05 -0400 (AST) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id 7B0DF3591C; Thu, 15 Nov 2007 07:35:01 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id 790D63590E; Thu, 15 Nov 2007 07:35:01 -0800 (PST) Date: Thu, 15 Nov 2007 07:35:01 -0800 (PST) From: Stephan Szabo To: Sabin Coanda Cc: pgsql-sql@postgresql.org Subject: Re: trap for any exception In-Reply-To: Message-ID: <20071115073257.O23226@megazone.bigpanda.com> References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200711/78 X-Sequence-Number: 29606 On Thu, 15 Nov 2007, Sabin Coanda wrote: > 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 > ? Won't OTHERS catch most of what you want?