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 02AFE5338E for ; Mon, 18 Apr 2005 16:08:11 -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 41602-09 for ; Mon, 18 Apr 2005 19:08:05 +0000 (GMT) Received: from tigger.fuhr.org (tigger.fuhr.org [63.214.45.158]) by svr1.postgresql.org (Postfix) with ESMTP id 9734553245 for ; Mon, 18 Apr 2005 16:08:03 -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 j3IJ7rnB029891 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 18 Apr 2005 13:07:56 -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 j3IJ7rBh041616; Mon, 18 Apr 2005 13:07:53 -0600 (MDT) (envelope-from mfuhr@winnie.fuhr.org) Received: (from mfuhr@localhost) by winnie.fuhr.org (8.13.3/8.13.3/Submit) id j3IJ7rbH041615; Mon, 18 Apr 2005 13:07:53 -0600 (MDT) (envelope-from mfuhr) Date: Mon, 18 Apr 2005 13:07:53 -0600 From: Michael Fuhr To: "A. Kulikov" Cc: pgsql-sql@postgresql.org Subject: Re: User Defined Functions Errors Message-ID: <20050418190753.GA40910@winnie.fuhr.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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/255 X-Sequence-Number: 21148 On Mon, Apr 18, 2005 at 10:32:26PM +0400, A. Kulikov wrote: > > How to I return an error from inside a user defined function? Use RAISE. See "Errors and Messages" in the PL/pgSQL documentation. http://www.postgresql.org/docs/8.0/interactive/plpgsql-errors-and-messages.html -- Michael Fuhr http://www.fuhr.org/~mfuhr/