Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id AE1E59FB9C4; Tue, 3 Apr 2007 20:31:02 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 10957-07; Tue, 3 Apr 2007 20:30:54 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from vms042pub.verizon.net (vms042pub.verizon.net [206.46.252.42]) by postgresql.org (Postfix) with ESMTP id 60B319FB995; Tue, 3 Apr 2007 20:30:59 -0300 (ADT) Received: from [192.168.7.5] ([71.101.9.227]) by vms042.mailsrvcs.net (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPA id <0JFY00HRH3ZE3AG0@vms042.mailsrvcs.net>; Tue, 03 Apr 2007 18:30:52 -0500 (CDT) Date: Tue, 03 Apr 2007 19:30:43 -0400 From: Joe Subject: Re: [SQL] exception handling in postgres plpgsql In-reply-to: To: Karthikeyan Sundaram Cc: pgsql-admin@postgresql.org, pgsql-sql@postgresql.org Message-id: <1175643043.756.1.camel@pampa> Organization: Freedom Circle, LLC MIME-version: 1.0 X-Mailer: Evolution 2.10.0 FreeBSD GNOME Team Port Content-type: text/plain Content-transfer-encoding: 7bit References: X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.205 tagged_above=0 required=5 tests=AWL=-0.396, BAYES_00=-2.599, NO_DNS_FOR_FROM=3.2 X-Spam-Level: X-Archive-Number: 200704/26 X-Sequence-Number: 25090 Hi, On Tue, 2007-04-03 at 15:35 -0700, Karthikeyan Sundaram wrote: > exception > when NO_DATA_FOUND > then > return 100; > end; > $$ > language 'plpgsql'; > > When I compile, I am getting an error message > ERROR: unrecognized exception condition "no_data_found" > CONTEXT: compile of PL/pgSQL function "audio_format_func" near line > 15 The constant is no_data. See http://www.postgresql.org/docs/8.2/static/errcodes-appendix.html Joe