Received: from sss.pgh.pa.us (sss.pgh.pa.us [209.114.132.154]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f17Iltx88850 for ; Wed, 7 Feb 2001 13:47:56 -0500 (EST) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.1/8.11.1) with ESMTP id f17Ilq906926; Wed, 7 Feb 2001 13:47:53 -0500 (EST) To: Jeff Eckermann cc: "'pgsql-sql@postgresql.org'" Subject: Re: Use of RETURN in pl/pgsql function In-reply-to: <08CD1781F85AD4118E0800A0C9B8580B0948FD@NEZU> References: <08CD1781F85AD4118E0800A0C9B8580B0948FD@NEZU> Comments: In-reply-to Jeff Eckermann message dated "Wed, 07 Feb 2001 12:20:36 -0600" Date: Wed, 07 Feb 2001 13:47:52 -0500 Message-ID: <6923.981571672@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200102/136 X-Sequence-Number: 1316 Jeff Eckermann writes: > I thought (based on recent posts) that this use of RETURN is allowed, but > when trying an insert to report_table, I get the following error: > ERROR: control reaches end of trigger procedure without RETURN Looks to me like you didn't cover the case where billing_frequency is not any of the values you tested for. Maybe you just want to raise an error in that case... regards, tom lane