From: Knud Müller <k.mueller@portrix.net>
To: pgsql-sql@postgresql.org
Subject: Return Opaque / Error in Function
Date: Wed, 28 Nov 2001 16:28:24 +0100
Message-ID: <NEBBIFELPDEINLGFJBFNEEHCCGAA.k.mueller@portrix.net> (raw)
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: k.mueller@portrix.net
Subject: Re: Return Opaque / Error in Function
In-Reply-To: <NEBBIFELPDEINLGFJBFNEEHCCGAA.k.mueller@portrix.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox