control reaches end of trigger procedure without RETURN

From: rramostalo(at)quorum(dot)com
To: pgsql-sql(at)postgresql(dot)org
Subject: control reaches end of trigger procedure without RETURN
Date: 2002-08-06 22:12:46
Message-ID: 86256C0D.007A463B.00@amadeus.quorum.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Haddon 2002-08-06 22:41:08 ALTER TABLE follow up
Previous Message Josh Berkus 2002-08-06 21:26:58 Re: problem fetching currval of sequence