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 B552E53419 for ; Mon, 18 Apr 2005 01:32:47 -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 46578-08 for ; Mon, 18 Apr 2005 04:32:38 +0000 (GMT) Received: from tigger.fuhr.org (tigger.fuhr.org [63.214.45.158]) by svr1.postgresql.org (Postfix) with ESMTP id 93B5C533E6 for ; Mon, 18 Apr 2005 01:32:36 -0300 (ADT) Received: from winnie.fuhr.org (winnie.fuhr.org [10.1.0.1]) by tigger.fuhr.org (8.13.3/8.13.3) with ESMTP id j3I4WX5w028926 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 17 Apr 2005 22:32:35 -0600 (MDT) (envelope-from mfuhr@winnie.fuhr.org) Received: from winnie.fuhr.org (localhost [127.0.0.1]) by winnie.fuhr.org (8.13.3/8.13.3) with ESMTP id j3I4WXvk094986; Sun, 17 Apr 2005 22:32:33 -0600 (MDT) (envelope-from mfuhr@winnie.fuhr.org) Received: (from mfuhr@localhost) by winnie.fuhr.org (8.13.3/8.13.3/Submit) id j3I4WWB9094985; Sun, 17 Apr 2005 22:32:32 -0600 (MDT) (envelope-from mfuhr) Date: Sun, 17 Apr 2005 22:32:32 -0600 From: Michael Fuhr To: Dinesh Pandey Cc: "'PostgreSQL'" Subject: Re: Error handling in pltcl Message-ID: <20050418043232.GA94872@winnie.fuhr.org> References: <20050418035436.5B4E553827@svr1.postgresql.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050418035436.5B4E553827@svr1.postgresql.org> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.004 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200504/238 X-Sequence-Number: 21131 On Mon, Apr 18, 2005 at 09:20:37AM +0530, Dinesh Pandey wrote: > > Can any one tell me how to handle error in PL/TCL language. What kind of error? Have you tried using catch? > On Error/Exception, > In the exception block I want to call a FUNCTION (written in PL/pgSQL). You could use spi_exec to SELECT the function. If you still have trouble, then please post a simple example that shows what you're trying to do. BTW, pgsql-sql probably isn't the best place to ask PL/Tcl questions since its description is "Discussion for users on SQL related matters." pgsql-general or pgsql-interfaces might be more appropriate. -- Michael Fuhr http://www.fuhr.org/~mfuhr/