Received: from bender.portrix.net ([62.16.157.20]) by postgresql.org (8.11.3/8.11.4) with ESMTP id fASGIZm81945 for ; Wed, 28 Nov 2001 11:18:35 -0500 (EST) (envelope-from k.mueller@portrix.net) Received: from KAM ([192.168.42.111]) by bender.portrix.net (8.11.0/8.11.0) with SMTP id fASGoh807010 for ; Wed, 28 Nov 2001 17:50:43 +0100 From: =?iso-8859-1?Q?Knud_M=FCller?= To: Subject: Return Opaque / Error in Function Date: Wed, 28 Nov 2001 16:28:24 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 X-Archive-Number: 200111/388 X-Sequence-Number: 5770 The following function is executed by a trigger. I'am receiving the error message following. What am I doing wrong ? Can someone help me ? Create Function update_productvariant() RETURNS OPAQUE AS 'DECLARE pid text; BEGIN pid := old.productvariantid; Insert into productupdate (productvariantid) values (pid); RETURN old; END;' Language 'plpgsql'; Error: mag=# Delete from productvariant where productvariantid='4015223929157'; ERROR: control reaches end of trigger procedure without RETURN DEBUG: Last error occured while executing PL/pgSQL function update_productvariant DEBUG: at END of toplevel PL block ERROR: control reaches end of trigger procedure without RETURN