Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id CFCC79FB99B; Tue, 3 Apr 2007 21:24:17 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 03444-03; Tue, 3 Apr 2007 21:24:14 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 742099FB98B; Tue, 3 Apr 2007 21:24:14 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id l340OC20014031; Tue, 3 Apr 2007 20:24:12 -0400 (EDT) To: Karthikeyan Sundaram cc: pgsql-admin@postgresql.org, pgsql-sql@postgresql.org Subject: Re: [SQL] exception handling in postgres plpgsql In-reply-to: References: Comments: In-reply-to Karthikeyan Sundaram message dated "Tue, 03 Apr 2007 15:35:17 -0700" Date: Tue, 03 Apr 2007 20:24:12 -0400 Message-ID: <14030.1175646252@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200704/27 X-Sequence-Number: 25091 Karthikeyan Sundaram writes: > When I compile, I am getting an error message > ERROR: unrecognized exception condition "no_data_found"CONTEXT: compile o= > f PL/pgSQL function "audio_format_func" near line 15 > =20 > How will I handle exceptions in postgres? Reading between the lines I gather that you are reading 8.2 documentation and trying to apply the info to some previous version that doesn't have SELECT INTO STRICT (which you failed to use anyway...) You probably want to test the magic FOUND variable instead --- see the plpgsql docs. regards, tom lane