From: Jeff Eckermann <jeff_eckermann@yahoo.com>
To: rramostalo@quorum.com
To: pgsql-sql@postgresql.org
Subject: Re: control reaches end of trigger procedure without RETURN
Date: Wed, 7 Aug 2002 06:35:24 -0700 (PDT)
Message-ID: <20020807133524.20086.qmail@web20803.mail.yahoo.com> (raw)
In-Reply-To: <86256C0D.007A463B.00@amadeus.quorum.com>
The error says it.
In this case, you need to add "return NEW;" before the
"end;"
--- rramostalo@quorum.com wrote:
>
>
> create function duplicate_images() returns OPAQUE
> as'
> DECLARE
> myrec RECORD;
> BEGIN
> if TG_OP = ''INSERT'' then
> select * into myrec from images where
> page=NEW.page and
> path=NEW.path;
> if found then
> raise exception ''insert failed:
> duplicate record found'';
> end if;
> end if;
> end;
> ' language 'plpgsql';
>
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
__________________________________________________
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com
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: jeff_eckermann@yahoo.com, rramostalo@quorum.com
Subject: Re: control reaches end of trigger procedure without RETURN
In-Reply-To: <20020807133524.20086.qmail@web20803.mail.yahoo.com>
* 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