pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: rramostalo@quorum.com
To: pgsql-sql@postgresql.org
Subject: control reaches end of trigger procedure without RETURN
Date: Wed, 7 Aug 2002 06:12:46 +0800
Message-ID: <86256C0D.007A463B.00@amadeus.quorum.com> (raw)



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';





view thread (2+ messages)  latest in thread

Message-ID: <86256C0D.007A463B.00@amadeus.quorum.com>
Permalink:  ../86256C0D.007A463B.00@amadeus.quorum.com/
Also on:    postgresql.org/message-id/86256C0D.007A463B.00@amadeus.quorum.com

 · 

reply

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: rramostalo@quorum.com
  Subject: Re: control reaches end of trigger procedure without RETURN
  In-Reply-To: <86256C0D.007A463B.00@amadeus.quorum.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